connpass_api_v2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.env.example +1 -0
- data/.rspec +3 -0
- data/.yardopts +6 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/Rakefile +23 -0
- data/Steepfile +34 -0
- data/lib/connpass_api_v2/client/event_methods.rb +79 -0
- data/lib/connpass_api_v2/client/group_methods.rb +26 -0
- data/lib/connpass_api_v2/client/user_methods.rb +80 -0
- data/lib/connpass_api_v2/client.rb +94 -0
- data/lib/connpass_api_v2/response.rb +7 -0
- data/lib/connpass_api_v2/version.rb +5 -0
- data/lib/connpass_api_v2.rb +21 -0
- data/rbs_collection.lock.yaml +140 -0
- data/rbs_collection.yaml +24 -0
- data/sig/connpass_api_v2/client/event_methods.rbs +27 -0
- data/sig/connpass_api_v2/client/group_methods.rbs +11 -0
- data/sig/connpass_api_v2/client/user_methods.rbs +29 -0
- data/sig/connpass_api_v2/client.rbs +23 -0
- data/sig/connpass_api_v2/response.rbs +4 -0
- data/sig/connpass_api_v2.rbs +10 -0
- metadata +222 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0a7bab716e4e979d4955097a3fa85354ef3571baf9432a6881414abeb72479f4
|
4
|
+
data.tar.gz: 7867e12219fa1abd8af0ac17bce814a2dbaef5660755030223dfd1ac8b122ccf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 75b1e4d1c4e9c64a3aed5997efc803292ad33a4d7c2fbdaf3e7b3ef44e14dd9c146ed9d8b847676733063c11f252162fc852b93146d5d5020076be27addfe218
|
7
|
+
data.tar.gz: b40cb881203e8c2af2148c48ea1cd726a790c7b6aec416ba041b0029a23bbfffca69c32a25d691723cb6f60db8e7b0220ededba84cf8e549e8d9714e6eb82d19
|
data/.env.example
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
CONNPASS_API_KEY=
|
data/.rspec
ADDED
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 sue445
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# ConnpassApiV2
|
2
|
+
[connpass API v2](https://connpass.com/about/api/v2/) client for Ruby
|
3
|
+
|
4
|
+
[](https://github.com/sue445/connpass_api_v2-ruby/actions/workflows/test.yml)
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Install the gem and add to the application's Gemfile by executing:
|
9
|
+
|
10
|
+
```bash
|
11
|
+
bundle add connpass_api_v2
|
12
|
+
```
|
13
|
+
|
14
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
gem install connpass_api_v2
|
18
|
+
```
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
```ruby
|
22
|
+
require "connpass_api_v2"
|
23
|
+
|
24
|
+
client = ConnpassApiV2.client(ENV["CONNPASS_API_KEY"])
|
25
|
+
|
26
|
+
client.get_events
|
27
|
+
```
|
28
|
+
|
29
|
+
All methods are followings
|
30
|
+
|
31
|
+
https://sue445.github.io/connpass_api_v2-ruby/ConnpassApiV2/Client.html
|
32
|
+
|
33
|
+
## Development
|
34
|
+
|
35
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
36
|
+
|
37
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
38
|
+
|
39
|
+
Steps to using `bin/console`
|
40
|
+
|
41
|
+
1. Get [connpass API key](https://connpass.com/about/api/v2/#section/%E6%A6%82%E8%A6%81/%E8%AA%8D%E8%A8%BC)
|
42
|
+
2. Put your key to `.env`
|
43
|
+
|
44
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
45
|
+
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sue445/connpass_api_v2.
|
49
|
+
|
50
|
+
## License
|
51
|
+
|
52
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rspec/core/rake_task"
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
namespace :rbs do
|
9
|
+
desc "`rbs collection install` and `git commit`"
|
10
|
+
task :install do
|
11
|
+
sh "rbs collection install"
|
12
|
+
sh "git add rbs_collection.lock.yaml"
|
13
|
+
sh "git commit -m 'rbs collection install' || true"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Check rbs"
|
18
|
+
task :rbs do
|
19
|
+
sh "rbs validate"
|
20
|
+
sh "steep check"
|
21
|
+
end
|
22
|
+
|
23
|
+
task default: %i[spec rbs]
|
data/Steepfile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# D = Steep::Diagnostic
|
2
|
+
|
3
|
+
target :lib do
|
4
|
+
signature "sig"
|
5
|
+
ignore_signature "sig/test"
|
6
|
+
|
7
|
+
check "lib" # Directory name
|
8
|
+
# check "path/to/source.rb" # File name
|
9
|
+
# check "app/models/**/*.rb" # Glob
|
10
|
+
# ignore "lib/templates/*.rb"
|
11
|
+
|
12
|
+
# library "pathname" # Standard libraries
|
13
|
+
# library "strong_json" # Gems
|
14
|
+
|
15
|
+
collection_config "rbs_collection.yaml"
|
16
|
+
|
17
|
+
# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
|
18
|
+
# configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
|
19
|
+
# configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
|
20
|
+
# configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting
|
21
|
+
# configure_code_diagnostics do |hash| # You can setup everything yourself
|
22
|
+
# hash[D::Ruby::NoMethod] = :information
|
23
|
+
# end
|
24
|
+
end
|
25
|
+
|
26
|
+
# target :test do
|
27
|
+
# unreferenced! # Skip type checking the `lib` code when types in `test` target is changed
|
28
|
+
# signature "sig/test" # Put RBS files for tests under `sig/test`
|
29
|
+
# check "test" # Type check Ruby scripts under `test`
|
30
|
+
#
|
31
|
+
# configure_code_diagnostics(D::Ruby.lenient) # Weak type checking for test code
|
32
|
+
#
|
33
|
+
# # library "pathname" # Standard libraries
|
34
|
+
# end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ConnpassApiV2
|
4
|
+
class Client
|
5
|
+
module EventMethods
|
6
|
+
# Search events
|
7
|
+
#
|
8
|
+
# @param event_id [Integer,Array<Integer>,nil]
|
9
|
+
# @param keyword [String,Array<String>,nil]
|
10
|
+
# @param keyword_or [String,Array<String>,nil]
|
11
|
+
# @param ym [String,Array<String>,Date,Array<Date>,nil] string is `yyyymm` format
|
12
|
+
# @param ymd [String,Array<String>,Date,Array<Date>,nil] string is `yyyymmdd` format
|
13
|
+
# @param nickname [String,Array<String>,nil]
|
14
|
+
# @param owner_nickname [String,Array<String>,nil]
|
15
|
+
# @param group_id [Integer,Array<Integer>,nil]
|
16
|
+
# @param subdomain [String,Array<String>,nil]
|
17
|
+
# @param prefecture [String,Array<String>,nil]
|
18
|
+
# @param order [Integer,Symbol,nil] `:updated_at` (1), `:started_at` (2), `:newest` (3)
|
19
|
+
# @param start [Integer,nil]
|
20
|
+
# @param count [Integer,nil]
|
21
|
+
#
|
22
|
+
# @return [ConnpassApiV2::Response]
|
23
|
+
#
|
24
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88/operation/connpass_event_event_api_v2_views_event_search
|
25
|
+
def get_events(event_id: nil, keyword: nil, keyword_or: nil, ym: nil, ymd: nil, nickname: nil, owner_nickname: nil,
|
26
|
+
group_id: nil, subdomain: nil, prefecture: nil, order: nil, start: nil, count: nil)
|
27
|
+
params = {
|
28
|
+
event_id: Client.joined_param(event_id),
|
29
|
+
keyword: Client.joined_param(keyword),
|
30
|
+
keyword_or: Client.joined_param(keyword_or),
|
31
|
+
nickname: Client.joined_param(nickname),
|
32
|
+
owner_nickname: Client.joined_param(owner_nickname),
|
33
|
+
group_id: Client.joined_param(group_id),
|
34
|
+
subdomain: Client.joined_param(subdomain),
|
35
|
+
prefecture: Client.joined_param(prefecture),
|
36
|
+
order: Client.to_order_num(order),
|
37
|
+
start: start,
|
38
|
+
count: count,
|
39
|
+
}
|
40
|
+
|
41
|
+
if ym
|
42
|
+
values = Array(ym).map do |v|
|
43
|
+
# @type var v: String | Date
|
44
|
+
Client.to_ym(v)
|
45
|
+
end
|
46
|
+
params[:ym] = Client.joined_param(values)
|
47
|
+
end
|
48
|
+
|
49
|
+
if ymd
|
50
|
+
values = Array(ymd).map do |v|
|
51
|
+
# @type var v: String | Date
|
52
|
+
Client.to_ymd(v)
|
53
|
+
end
|
54
|
+
params[:ymd] = Client.joined_param(values)
|
55
|
+
end
|
56
|
+
|
57
|
+
connection.get("events/", params.compact).body # steep:ignore NoMethod
|
58
|
+
end
|
59
|
+
|
60
|
+
# Get list of presentations submitted to the event
|
61
|
+
#
|
62
|
+
# @param event_id [Integer]
|
63
|
+
# @param start [Integer,nil]
|
64
|
+
# @param count [Integer,nil]
|
65
|
+
#
|
66
|
+
# @return [ConnpassApiV2::Response]
|
67
|
+
#
|
68
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88/operation/connpass_event_event_api_v2_views_event_presentation
|
69
|
+
def get_event_presentations(event_id, start: nil, count: nil)
|
70
|
+
params = {
|
71
|
+
start: start,
|
72
|
+
count: count,
|
73
|
+
}
|
74
|
+
|
75
|
+
connection.get("events/#{event_id}/presentations/", params.compact).body # steep:ignore NoMethod
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ConnpassApiV2
|
4
|
+
class Client
|
5
|
+
module GroupMethods
|
6
|
+
# Search groups
|
7
|
+
#
|
8
|
+
# @param subdomain [String,Array<String>,nil]
|
9
|
+
# @param start [Integer,nil]
|
10
|
+
# @param count [Integer,nil]
|
11
|
+
#
|
12
|
+
# @return [ConnpassApiV2::Response]
|
13
|
+
#
|
14
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%82%B0%E3%83%AB%E3%83%BC%E3%83%97/operation/connpass_group_group_api_v2_views_group_search
|
15
|
+
def get_groups(subdomain: nil, start: nil, count: nil)
|
16
|
+
params = {
|
17
|
+
subdomain: Client.joined_param(subdomain),
|
18
|
+
start: start,
|
19
|
+
count: count,
|
20
|
+
}
|
21
|
+
|
22
|
+
connection.get("groups/", params.compact).body # steep:ignore NoMethod
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ConnpassApiV2
|
4
|
+
class Client
|
5
|
+
module UserMethods
|
6
|
+
# Search users
|
7
|
+
#
|
8
|
+
# @param nickname [String,Array<String>,nil]
|
9
|
+
# @param start [Integer,nil]
|
10
|
+
# @param count [Integer,nil]
|
11
|
+
#
|
12
|
+
# @return [ConnpassApiV2::Response]
|
13
|
+
#
|
14
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC/operation/connpass_account_account_api_v2_views_user_search
|
15
|
+
def get_users(nickname: nil, start: nil, count: nil)
|
16
|
+
params = {
|
17
|
+
nickname: Client.joined_param(nickname),
|
18
|
+
start: start,
|
19
|
+
count: count,
|
20
|
+
}
|
21
|
+
|
22
|
+
connection.get("users/", params.compact).body # steep:ignore NoMethod
|
23
|
+
end
|
24
|
+
|
25
|
+
# Get user groups
|
26
|
+
#
|
27
|
+
# @param nickname [String]
|
28
|
+
# @param start [Integer,nil]
|
29
|
+
# @param count [Integer,nil]
|
30
|
+
#
|
31
|
+
# @return [ConnpassApiV2::Response]
|
32
|
+
#
|
33
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC/operation/connpass_account_account_api_v2_views_user_group
|
34
|
+
def get_user_groups(nickname, start: nil, count: nil)
|
35
|
+
params = {
|
36
|
+
start: start,
|
37
|
+
count: count,
|
38
|
+
}
|
39
|
+
|
40
|
+
connection.get("users/#{nickname}/groups/", params.compact).body # steep:ignore NoMethod
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get user attended events
|
44
|
+
#
|
45
|
+
# @param nickname [String]
|
46
|
+
# @param start [Integer,nil]
|
47
|
+
# @param count [Integer,nil]
|
48
|
+
#
|
49
|
+
# @return [ConnpassApiV2::Response]
|
50
|
+
#
|
51
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC/operation/connpass_account_account_api_v2_views_user_attended_event
|
52
|
+
def get_user_attended_events(nickname, start: nil, count: nil)
|
53
|
+
params = {
|
54
|
+
start: start,
|
55
|
+
count: count,
|
56
|
+
}
|
57
|
+
|
58
|
+
connection.get("users/#{nickname}/attended_events/", params.compact).body # steep:ignore NoMethod
|
59
|
+
end
|
60
|
+
|
61
|
+
# Get user presenter events
|
62
|
+
#
|
63
|
+
# @param nickname [String]
|
64
|
+
# @param start [Integer,nil]
|
65
|
+
# @param count [Integer,nil]
|
66
|
+
#
|
67
|
+
# @return [ConnpassApiV2::Response]
|
68
|
+
#
|
69
|
+
# @see https://connpass.com/about/api/v2/#tag/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC/operation/connpass_account_account_api_v2_views_user_presenter_event
|
70
|
+
def get_user_presenter_events(nickname, start: nil, count: nil)
|
71
|
+
params = {
|
72
|
+
start: start,
|
73
|
+
count: count,
|
74
|
+
}
|
75
|
+
|
76
|
+
connection.get("users/#{nickname}/presenter_events/", params.compact).body # steep:ignore NoMethod
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ConnpassApiV2
|
4
|
+
class Client
|
5
|
+
autoload :EventMethods, "connpass_api_v2/client/event_methods"
|
6
|
+
autoload :GroupMethods, "connpass_api_v2/client/group_methods"
|
7
|
+
autoload :UserMethods, "connpass_api_v2/client/user_methods"
|
8
|
+
|
9
|
+
include EventMethods
|
10
|
+
include GroupMethods
|
11
|
+
include UserMethods
|
12
|
+
|
13
|
+
API_ENDPOINT = "https://connpass.com/api/v2"
|
14
|
+
|
15
|
+
# @param api_key [String]
|
16
|
+
def initialize(api_key)
|
17
|
+
@api_key = api_key
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [String]
|
21
|
+
def inspect
|
22
|
+
# NOTE: hide @api_key
|
23
|
+
%Q(#<ConnpassApiV2::Client:0x#{"%016X" % object_id} @api_key="*****************">)
|
24
|
+
end
|
25
|
+
|
26
|
+
# @param param [Object]
|
27
|
+
#
|
28
|
+
# @return [String,nil]
|
29
|
+
def self.joined_param(param)
|
30
|
+
return nil unless param
|
31
|
+
|
32
|
+
Array(param).join(",")
|
33
|
+
end
|
34
|
+
|
35
|
+
# Convert to `yyyymmdd` formatted string
|
36
|
+
#
|
37
|
+
# @param param [String,Date,nil]
|
38
|
+
#
|
39
|
+
# @return [String,nil]
|
40
|
+
def self.to_ymd(param)
|
41
|
+
return nil unless param
|
42
|
+
|
43
|
+
return param.strftime("%Y%m%d") if param.is_a?(Date)
|
44
|
+
|
45
|
+
param
|
46
|
+
end
|
47
|
+
|
48
|
+
# Convert to `yyyymm` formatted string
|
49
|
+
#
|
50
|
+
# @param param [String,Date,nil]
|
51
|
+
#
|
52
|
+
# @return [String,nil]
|
53
|
+
def self.to_ym(param)
|
54
|
+
return nil unless param
|
55
|
+
|
56
|
+
return param.strftime("%Y%m") if param.is_a?(Date)
|
57
|
+
|
58
|
+
param
|
59
|
+
end
|
60
|
+
|
61
|
+
# @param order [Integer,Symbol,nil]
|
62
|
+
#
|
63
|
+
# @return [Integer,nil]
|
64
|
+
def self.to_order_num(order)
|
65
|
+
order_to_num = {
|
66
|
+
updated_at: 1,
|
67
|
+
started_at: 2,
|
68
|
+
newest: 3,
|
69
|
+
}
|
70
|
+
|
71
|
+
order_to_num[order] || order # steep:ignore
|
72
|
+
end
|
73
|
+
|
74
|
+
private
|
75
|
+
|
76
|
+
# @return [Faraday::Connection]
|
77
|
+
def connection
|
78
|
+
request_headers = {
|
79
|
+
"User-Agent" => "connpass_api_v2-ruby/v#{VERSION} (+https://github.com/sue445/connpass_api_v2-ruby)",
|
80
|
+
"Content-Type" => "application/json",
|
81
|
+
"X-Api-Key" => @api_key,
|
82
|
+
}
|
83
|
+
|
84
|
+
Faraday.new(url: API_ENDPOINT, headers: request_headers) do |conn|
|
85
|
+
conn.request :json
|
86
|
+
conn.response :mashify, mash_class: Response
|
87
|
+
conn.response :json
|
88
|
+
conn.response :raise_error
|
89
|
+
|
90
|
+
conn.adapter Faraday.default_adapter
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "connpass_api_v2/version"
|
4
|
+
|
5
|
+
require "hashie/mash"
|
6
|
+
require "faraday"
|
7
|
+
require "faraday/mashify"
|
8
|
+
|
9
|
+
module ConnpassApiV2
|
10
|
+
class Error < StandardError; end
|
11
|
+
|
12
|
+
autoload :Client, "connpass_api_v2/client"
|
13
|
+
autoload :Response, "connpass_api_v2/response"
|
14
|
+
|
15
|
+
# @param api_key [String]
|
16
|
+
#
|
17
|
+
# @return [ConnpassApiV2::Client]
|
18
|
+
def self.client(api_key)
|
19
|
+
Client.new(api_key)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
---
|
2
|
+
path: ".gem_rbs_collection"
|
3
|
+
gems:
|
4
|
+
- name: addressable
|
5
|
+
version: '2.8'
|
6
|
+
source:
|
7
|
+
type: git
|
8
|
+
name: ruby/gem_rbs_collection
|
9
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
10
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
|
+
repo_dir: gems
|
12
|
+
- name: ast
|
13
|
+
version: '2.4'
|
14
|
+
source:
|
15
|
+
type: git
|
16
|
+
name: ruby/gem_rbs_collection
|
17
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
18
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
19
|
+
repo_dir: gems
|
20
|
+
- name: bigdecimal
|
21
|
+
version: '3.1'
|
22
|
+
source:
|
23
|
+
type: git
|
24
|
+
name: ruby/gem_rbs_collection
|
25
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
26
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
27
|
+
repo_dir: gems
|
28
|
+
- name: binding_of_caller
|
29
|
+
version: '1.0'
|
30
|
+
source:
|
31
|
+
type: git
|
32
|
+
name: ruby/gem_rbs_collection
|
33
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
34
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
35
|
+
repo_dir: gems
|
36
|
+
- name: date
|
37
|
+
version: '0'
|
38
|
+
source:
|
39
|
+
type: stdlib
|
40
|
+
- name: diff-lcs
|
41
|
+
version: '1.5'
|
42
|
+
source:
|
43
|
+
type: git
|
44
|
+
name: ruby/gem_rbs_collection
|
45
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
46
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
47
|
+
repo_dir: gems
|
48
|
+
- name: faraday
|
49
|
+
version: '2.7'
|
50
|
+
source:
|
51
|
+
type: git
|
52
|
+
name: ruby/gem_rbs_collection
|
53
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
54
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
55
|
+
repo_dir: gems
|
56
|
+
- name: fileutils
|
57
|
+
version: '0'
|
58
|
+
source:
|
59
|
+
type: stdlib
|
60
|
+
- name: forwardable
|
61
|
+
version: '0'
|
62
|
+
source:
|
63
|
+
type: stdlib
|
64
|
+
- name: hashdiff
|
65
|
+
version: '1.1'
|
66
|
+
source:
|
67
|
+
type: git
|
68
|
+
name: ruby/gem_rbs_collection
|
69
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
70
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
71
|
+
repo_dir: gems
|
72
|
+
- name: hashie
|
73
|
+
version: '5.0'
|
74
|
+
source:
|
75
|
+
type: git
|
76
|
+
name: ruby/gem_rbs_collection
|
77
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
78
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
79
|
+
repo_dir: gems
|
80
|
+
- name: json
|
81
|
+
version: '0'
|
82
|
+
source:
|
83
|
+
type: stdlib
|
84
|
+
- name: logger
|
85
|
+
version: '0'
|
86
|
+
source:
|
87
|
+
type: stdlib
|
88
|
+
- name: monitor
|
89
|
+
version: '0'
|
90
|
+
source:
|
91
|
+
type: stdlib
|
92
|
+
- name: net-http
|
93
|
+
version: '0'
|
94
|
+
source:
|
95
|
+
type: stdlib
|
96
|
+
- name: net-protocol
|
97
|
+
version: '0'
|
98
|
+
source:
|
99
|
+
type: stdlib
|
100
|
+
- name: parser
|
101
|
+
version: '3.2'
|
102
|
+
source:
|
103
|
+
type: git
|
104
|
+
name: ruby/gem_rbs_collection
|
105
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
106
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
107
|
+
repo_dir: gems
|
108
|
+
- name: rake
|
109
|
+
version: '13.0'
|
110
|
+
source:
|
111
|
+
type: git
|
112
|
+
name: ruby/gem_rbs_collection
|
113
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
114
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
115
|
+
repo_dir: gems
|
116
|
+
- name: rspec-parameterized-core
|
117
|
+
version: 1.0.1
|
118
|
+
source:
|
119
|
+
type: rubygems
|
120
|
+
- name: rspec-parameterized-table_syntax
|
121
|
+
version: 1.0.1
|
122
|
+
source:
|
123
|
+
type: rubygems
|
124
|
+
- name: timeout
|
125
|
+
version: '0'
|
126
|
+
source:
|
127
|
+
type: stdlib
|
128
|
+
- name: uri
|
129
|
+
version: '0'
|
130
|
+
source:
|
131
|
+
type: stdlib
|
132
|
+
- name: webmock
|
133
|
+
version: '3.19'
|
134
|
+
source:
|
135
|
+
type: git
|
136
|
+
name: ruby/gem_rbs_collection
|
137
|
+
revision: 61a28f2cc8fe29f87c6d9d7da03615f5f0289c36
|
138
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
139
|
+
repo_dir: gems
|
140
|
+
gemfile_lock_path: Gemfile.lock
|
data/rbs_collection.yaml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Download sources
|
2
|
+
sources:
|
3
|
+
- type: git
|
4
|
+
name: ruby/gem_rbs_collection
|
5
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
6
|
+
revision: main
|
7
|
+
repo_dir: gems
|
8
|
+
|
9
|
+
# You can specify local directories as sources also.
|
10
|
+
# - type: local
|
11
|
+
# path: path/to/your/local/repository
|
12
|
+
|
13
|
+
# A directory to install the downloaded RBSs
|
14
|
+
path: .gem_rbs_collection
|
15
|
+
|
16
|
+
gems:
|
17
|
+
- name: rbs
|
18
|
+
ignore: true
|
19
|
+
- name: steep
|
20
|
+
ignore: true
|
21
|
+
- name: yard
|
22
|
+
ignore: true
|
23
|
+
- name: date
|
24
|
+
- name: hashie
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module ConnpassApiV2
|
2
|
+
class Client
|
3
|
+
module EventMethods
|
4
|
+
def get_events: (
|
5
|
+
?event_id: (Integer | Array[Integer])?,
|
6
|
+
?keyword: (String | Array[String])?,
|
7
|
+
?keyword_or: (String | Array[String])?,
|
8
|
+
?ym: (String | Array[String] | Date | Array[Date])?,
|
9
|
+
?ymd: (String | Array[String] | Date | Array[Date])?,
|
10
|
+
?nickname: (String | Array[String])?,
|
11
|
+
?owner_nickname: (String | Array[String])?,
|
12
|
+
?group_id: (Integer | Array[Integer])?,
|
13
|
+
?subdomain: (String | Array[String])?,
|
14
|
+
?prefecture: (String | Array[String])?,
|
15
|
+
?order: (Integer | Symbol)?,
|
16
|
+
?start: Integer?,
|
17
|
+
?count: Integer?,
|
18
|
+
) -> Response
|
19
|
+
|
20
|
+
def get_event_presentations: (
|
21
|
+
Integer event_id,
|
22
|
+
?start: Integer?,
|
23
|
+
?count: Integer?,
|
24
|
+
) -> Response
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module ConnpassApiV2
|
2
|
+
class Client
|
3
|
+
module UserMethods
|
4
|
+
def get_users: (
|
5
|
+
?nickname: (String | Array[String])?,
|
6
|
+
?start: Integer?,
|
7
|
+
?count: Integer?,
|
8
|
+
) -> Response
|
9
|
+
|
10
|
+
def get_user_groups: (
|
11
|
+
String nickname,
|
12
|
+
?start: Integer?,
|
13
|
+
?count: Integer?,
|
14
|
+
) -> Response
|
15
|
+
|
16
|
+
def get_user_attended_events: (
|
17
|
+
String nickname,
|
18
|
+
?start: Integer?,
|
19
|
+
?count: Integer?,
|
20
|
+
) -> Response
|
21
|
+
|
22
|
+
def get_user_presenter_events: (
|
23
|
+
String nickname,
|
24
|
+
?start: Integer?,
|
25
|
+
?count: Integer?,
|
26
|
+
) -> Response
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ConnpassApiV2
|
2
|
+
class Client
|
3
|
+
@api_key: String
|
4
|
+
|
5
|
+
API_ENDPOINT: string
|
6
|
+
|
7
|
+
def initialize: (String api_key) -> void
|
8
|
+
|
9
|
+
def inspect: () -> String
|
10
|
+
|
11
|
+
def self.joined_param: (untyped param) -> String?
|
12
|
+
|
13
|
+
def self.to_ymd: ((String | Date)? param) -> String?
|
14
|
+
|
15
|
+
def self.to_ym: ((String | Date)? param) -> String?
|
16
|
+
|
17
|
+
def self.to_order_num: ((Integer | Symbol)? order) -> Integer?
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def connection: () -> Faraday::Connection
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,222 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: connpass_api_v2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- sue445
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-04-05 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: faraday
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: 2.0.0
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 2.0.0
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: faraday-mashify
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: dotenv
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
type: :development
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rake
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '13.0'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '13.0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rbs
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rspec
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rspec-its
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rspec-parameterized
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: steep
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
type: :development
|
132
|
+
prerelease: false
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: webmock
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: yard
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
type: :development
|
160
|
+
prerelease: false
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
description: connpass API v2 client for Ruby
|
167
|
+
email:
|
168
|
+
- sue445@sue445.net
|
169
|
+
executables: []
|
170
|
+
extensions: []
|
171
|
+
extra_rdoc_files: []
|
172
|
+
files:
|
173
|
+
- ".env.example"
|
174
|
+
- ".rspec"
|
175
|
+
- ".yardopts"
|
176
|
+
- CHANGELOG.md
|
177
|
+
- LICENSE.txt
|
178
|
+
- README.md
|
179
|
+
- Rakefile
|
180
|
+
- Steepfile
|
181
|
+
- lib/connpass_api_v2.rb
|
182
|
+
- lib/connpass_api_v2/client.rb
|
183
|
+
- lib/connpass_api_v2/client/event_methods.rb
|
184
|
+
- lib/connpass_api_v2/client/group_methods.rb
|
185
|
+
- lib/connpass_api_v2/client/user_methods.rb
|
186
|
+
- lib/connpass_api_v2/response.rb
|
187
|
+
- lib/connpass_api_v2/version.rb
|
188
|
+
- rbs_collection.lock.yaml
|
189
|
+
- rbs_collection.yaml
|
190
|
+
- sig/connpass_api_v2.rbs
|
191
|
+
- sig/connpass_api_v2/client.rbs
|
192
|
+
- sig/connpass_api_v2/client/event_methods.rbs
|
193
|
+
- sig/connpass_api_v2/client/group_methods.rbs
|
194
|
+
- sig/connpass_api_v2/client/user_methods.rbs
|
195
|
+
- sig/connpass_api_v2/response.rbs
|
196
|
+
homepage: https://github.com/sue445/connpass_api_v2-ruby
|
197
|
+
licenses:
|
198
|
+
- MIT
|
199
|
+
metadata:
|
200
|
+
homepage_uri: https://github.com/sue445/connpass_api_v2-ruby
|
201
|
+
source_code_uri: https://github.com/sue445/connpass_api_v2-ruby
|
202
|
+
changelog_uri: https://github.com/sue445/connpass_api_v2-ruby/blob/main/CHANGELOG.md
|
203
|
+
documentation_uri: https://sue445.github.io/connpass_api_v2-ruby/
|
204
|
+
rubygems_mfa_required: 'true'
|
205
|
+
rdoc_options: []
|
206
|
+
require_paths:
|
207
|
+
- lib
|
208
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: 3.1.0
|
213
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - ">="
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '0'
|
218
|
+
requirements: []
|
219
|
+
rubygems_version: 3.6.2
|
220
|
+
specification_version: 4
|
221
|
+
summary: connpass API v2 client for Ruby
|
222
|
+
test_files: []
|