pluralkit-api 1.0.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.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +136 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountsApi.md +72 -0
  6. data/docs/FullSwitch.md +20 -0
  7. data/docs/Member.md +58 -0
  8. data/docs/MembersApi.md +353 -0
  9. data/docs/Message.md +30 -0
  10. data/docs/PrivacySetting.md +15 -0
  11. data/docs/ProxyTag.md +20 -0
  12. data/docs/ProxyingApi.md +70 -0
  13. data/docs/Switch.md +20 -0
  14. data/docs/SwitchesApi.md +208 -0
  15. data/docs/System.md +40 -0
  16. data/docs/SystemsApi.md +475 -0
  17. data/git_push.sh +58 -0
  18. data/lib/pluralkit-api.rb +51 -0
  19. data/lib/pluralkit-api/api/accounts_api.rb +98 -0
  20. data/lib/pluralkit-api/api/members_api.rb +389 -0
  21. data/lib/pluralkit-api/api/proxying_api.rb +96 -0
  22. data/lib/pluralkit-api/api/switches_api.rb +236 -0
  23. data/lib/pluralkit-api/api/systems_api.rb +525 -0
  24. data/lib/pluralkit-api/api_client.rb +390 -0
  25. data/lib/pluralkit-api/api_error.rb +57 -0
  26. data/lib/pluralkit-api/configuration.rb +277 -0
  27. data/lib/pluralkit-api/models/full_switch.rb +231 -0
  28. data/lib/pluralkit-api/models/member.rb +568 -0
  29. data/lib/pluralkit-api/models/message.rb +274 -0
  30. data/lib/pluralkit-api/models/privacy_setting.rb +37 -0
  31. data/lib/pluralkit-api/models/proxy_tag.rb +262 -0
  32. data/lib/pluralkit-api/models/switch.rb +231 -0
  33. data/lib/pluralkit-api/models/system.rb +417 -0
  34. data/lib/pluralkit-api/version.rb +15 -0
  35. data/pluralkit-api.gemspec +38 -0
  36. data/spec/api/accounts_api_spec.rb +47 -0
  37. data/spec/api/members_api_spec.rb +92 -0
  38. data/spec/api/proxying_api_spec.rb +46 -0
  39. data/spec/api/switches_api_spec.rb +70 -0
  40. data/spec/api/systems_api_spec.rb +118 -0
  41. data/spec/api_client_spec.rb +226 -0
  42. data/spec/configuration_spec.rb +42 -0
  43. data/spec/models/full_switch_spec.rb +40 -0
  44. data/spec/models/member_spec.rb +154 -0
  45. data/spec/models/message_spec.rb +70 -0
  46. data/spec/models/privacy_setting_spec.rb +28 -0
  47. data/spec/models/proxy_tag_spec.rb +40 -0
  48. data/spec/models/switch_spec.rb +40 -0
  49. data/spec/models/system_spec.rb +94 -0
  50. data/spec/spec_helper.rb +111 -0
  51. metadata +147 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b760919cff18de8fe70aac7cecc1f8c7366182d3c00dcab6e495b78c97a8f158
4
+ data.tar.gz: ed223f0d348bbbb91915e501d2866ef4d22879f58774a8cbe30f0bc581ec4b8f
5
+ SHA512:
6
+ metadata.gz: 4957c116ec12b32fcd69f09867818195eee093012555917f5afb2c521e847065f1d5555eaa58570f5a98aa4ce678942a57587076d947cf551b54b2f2ff84a196
7
+ data.tar.gz: 956bc25c11d5a3d545b5ada70950bd1f557a5016a4e9e85945276bb80cecbb7bc9c97767c4d1c8528096f7f0b36ac370bf5d396c78b241c18d38796f12ed61ff
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # pluralkit-api
2
+
3
+ PluralKitAPI - the Ruby gem for the PluralKit
4
+
5
+ This is the API for [PluralKit](https://pluralkit.me/)! :)
6
+
7
+ The API itself is stable, but this document (the OpenAPI description) is still subject to change, and may be updated, corrected or restructured in the future (as long as it's still coherent with the real API).
8
+
9
+ # Authentication
10
+ Authentication is handled using a \"system token\". At the moment, the only way
11
+ to obtain a system token is to use the `pk;token` command through the Discord bot.
12
+
13
+ This will generate an opaque string you must pass as the `Authorization` header to API requests.
14
+ Many API endpoints are available anonymously, but most of them will hide information from
15
+ unauthenticated requests to align with the relevant privacy settings.
16
+
17
+ # Errors
18
+ Errors are just returned as HTTP response codes. Most error responses include a human-readable
19
+ error message as the body, but this should not be relied on. Just read the response codes :)
20
+
21
+ # OpenAPI version history
22
+ - **1.1**: Granular member privacy
23
+ - **1.0**: (initial definition version)
24
+
25
+
26
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
27
+
28
+ - API version: 1.1
29
+ - Package version: 1.0.0
30
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
31
+
32
+ ## Installation
33
+
34
+ ### Build a gem
35
+
36
+ To build the Ruby code into a gem:
37
+
38
+ ```shell
39
+ gem build pluralkit-api.gemspec
40
+ ```
41
+
42
+ Then either install the gem locally:
43
+
44
+ ```shell
45
+ gem install ./pluralkit-api-1.0.0.gem
46
+ ```
47
+
48
+ (for development, run `gem install --dev ./pluralkit-api-1.0.0.gem` to install the development dependencies)
49
+
50
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
51
+
52
+ Finally add this to the Gemfile:
53
+
54
+ gem 'pluralkit-api', '~> 1.0.0'
55
+
56
+ ### Install from Git
57
+
58
+ If the Ruby gem is hosted at a git repository: https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
59
+
60
+ gem 'pluralkit-api', :git => 'https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
61
+
62
+ ### Include the Ruby code directly
63
+
64
+ Include the Ruby code directly using `-I` as follows:
65
+
66
+ ```shell
67
+ ruby -Ilib script.rb
68
+ ```
69
+
70
+ ## Getting Started
71
+
72
+ Please follow the [installation](#installation) procedure and then run the following code:
73
+
74
+ ```ruby
75
+ # Load the gem
76
+ require 'pluralkit-api'
77
+
78
+ api_instance = PluralKitAPI::AccountsApi.new
79
+ id = 'id_example' # String | A Discord user ID.
80
+
81
+ begin
82
+ #Gets a system by (one of) its associated Discord accounts.
83
+ result = api_instance.a_id_get(id)
84
+ p result
85
+ rescue PluralKitAPI::ApiError => e
86
+ puts "Exception when calling AccountsApi->a_id_get: #{e}"
87
+ end
88
+
89
+ ```
90
+
91
+ ## Documentation for API Endpoints
92
+
93
+ All URIs are relative to *https://api.pluralkit.me/v1*
94
+
95
+ Class | Method | HTTP request | Description
96
+ ------------ | ------------- | ------------- | -------------
97
+ *PluralKitAPI::AccountsApi* | [**a_id_get**](docs/AccountsApi.md#a_id_get) | **GET** /a/{id} | Gets a system by (one of) its associated Discord accounts.
98
+ *PluralKitAPI::MembersApi* | [**create_member**](docs/MembersApi.md#create_member) | **POST** /m | Creates a new member in your system.
99
+ *PluralKitAPI::MembersApi* | [**delete_member**](docs/MembersApi.md#delete_member) | **DELETE** /m/{id} | Deletes a member.
100
+ *PluralKitAPI::MembersApi* | [**get_member**](docs/MembersApi.md#get_member) | **GET** /m/{id} | Gets a member by their ID.
101
+ *PluralKitAPI::MembersApi* | [**get_system_members**](docs/MembersApi.md#get_system_members) | **GET** /s/{id}/members | Gets a system's members.
102
+ *PluralKitAPI::MembersApi* | [**update_member**](docs/MembersApi.md#update_member) | **PATCH** /m/{id} | Updates a member.
103
+ *PluralKitAPI::ProxyingApi* | [**msg_id_get**](docs/ProxyingApi.md#msg_id_get) | **GET** /msg/{id} | Gets information about a proxied message by its message ID.
104
+ *PluralKitAPI::SwitchesApi* | [**get_system_fronters**](docs/SwitchesApi.md#get_system_fronters) | **GET** /s/{id}/fronters | Gets a system's current fronters.
105
+ *PluralKitAPI::SwitchesApi* | [**get_system_switches**](docs/SwitchesApi.md#get_system_switches) | **GET** /s/{id}/switches | Gets a system's switch history.
106
+ *PluralKitAPI::SwitchesApi* | [**register_switch**](docs/SwitchesApi.md#register_switch) | **POST** /s/switches | Registers a new switch.
107
+ *PluralKitAPI::SystemsApi* | [**a_id_get**](docs/SystemsApi.md#a_id_get) | **GET** /a/{id} | Gets a system by (one of) its associated Discord accounts.
108
+ *PluralKitAPI::SystemsApi* | [**get_own_system**](docs/SystemsApi.md#get_own_system) | **GET** /s | Returns your own system.
109
+ *PluralKitAPI::SystemsApi* | [**get_system**](docs/SystemsApi.md#get_system) | **GET** /s/{id} | Gets a system by its ID.
110
+ *PluralKitAPI::SystemsApi* | [**get_system_fronters**](docs/SystemsApi.md#get_system_fronters) | **GET** /s/{id}/fronters | Gets a system's current fronters.
111
+ *PluralKitAPI::SystemsApi* | [**get_system_members**](docs/SystemsApi.md#get_system_members) | **GET** /s/{id}/members | Gets a system's members.
112
+ *PluralKitAPI::SystemsApi* | [**get_system_switches**](docs/SystemsApi.md#get_system_switches) | **GET** /s/{id}/switches | Gets a system's switch history.
113
+ *PluralKitAPI::SystemsApi* | [**update_system**](docs/SystemsApi.md#update_system) | **PATCH** /s | Updates an existing system.
114
+
115
+
116
+ ## Documentation for Models
117
+
118
+ - [PluralKitAPI::FullSwitch](docs/FullSwitch.md)
119
+ - [PluralKitAPI::Member](docs/Member.md)
120
+ - [PluralKitAPI::Message](docs/Message.md)
121
+ - [PluralKitAPI::PrivacySetting](docs/PrivacySetting.md)
122
+ - [PluralKitAPI::ProxyTag](docs/ProxyTag.md)
123
+ - [PluralKitAPI::Switch](docs/Switch.md)
124
+ - [PluralKitAPI::System](docs/System.md)
125
+
126
+
127
+ ## Documentation for Authorization
128
+
129
+
130
+ ### TokenAuth
131
+
132
+
133
+ - **Type**: API key
134
+ - **API key parameter name**: Authorization
135
+ - **Location**: HTTP header
136
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,72 @@
1
+ # PluralKitAPI::AccountsApi
2
+
3
+ All URIs are relative to *https://api.pluralkit.me/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**a_id_get**](AccountsApi.md#a_id_get) | **GET** /a/{id} | Gets a system by (one of) its associated Discord accounts. |
8
+
9
+
10
+ ## a_id_get
11
+
12
+ > <System> a_id_get(id)
13
+
14
+ Gets a system by (one of) its associated Discord accounts.
15
+
16
+ Note that it's currently not possible to get a system's registered accounts given a system ID through the API. Consider this endpoint \"one-way\".
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'pluralkit-api'
23
+
24
+ api_instance = PluralKitAPI::AccountsApi.new
25
+ id = 'id_example' # String | A Discord user ID.
26
+
27
+ begin
28
+ # Gets a system by (one of) its associated Discord accounts.
29
+ result = api_instance.a_id_get(id)
30
+ p result
31
+ rescue PluralKitAPI::ApiError => e
32
+ puts "Error when calling AccountsApi->a_id_get: #{e}"
33
+ end
34
+ ```
35
+
36
+ #### Using the a_id_get_with_http_info variant
37
+
38
+ This returns an Array which contains the response data, status code and headers.
39
+
40
+ > <Array(<System>, Integer, Hash)> a_id_get_with_http_info(id)
41
+
42
+ ```ruby
43
+ begin
44
+ # Gets a system by (one of) its associated Discord accounts.
45
+ data, status_code, headers = api_instance.a_id_get_with_http_info(id)
46
+ p status_code # => 2xx
47
+ p headers # => { ... }
48
+ p data # => <System>
49
+ rescue PluralKitAPI::ApiError => e
50
+ puts "Error when calling AccountsApi->a_id_get_with_http_info: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ | Name | Type | Description | Notes |
57
+ | ---- | ---- | ----------- | ----- |
58
+ | **id** | **String** | A Discord user ID. | |
59
+
60
+ ### Return type
61
+
62
+ [**System**](System.md)
63
+
64
+ ### Authorization
65
+
66
+ No authorization required
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: Not defined
71
+ - **Accept**: application/json
72
+
@@ -0,0 +1,20 @@
1
+ # PluralKitAPI::FullSwitch
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **timestamp** | **Time** | The timestamp the switch was logged. | [optional] |
8
+ | **members** | [**Array&lt;Member&gt;**](Member.md) | A list of the members in this switch. The order is significant. It is valid for the switch to have no members at all. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pluralkit-api'
14
+
15
+ instance = PluralKitAPI::FullSwitch.new(
16
+ timestamp: null,
17
+ members: null
18
+ )
19
+ ```
20
+
data/docs/Member.md ADDED
@@ -0,0 +1,58 @@
1
+ # PluralKitAPI::Member
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | A unique identifier for a system or a member, as a randomly generated string of five lowercase letters. These IDs are guaranteed to be globally unique for the given model type (a system can have the same ID as a member, but two systems or two members can never share an ID). The IDs can on rare occasions change - eg. if a profane word is generated and later regenerated, or as a potential future Patreon perk. However, it&#39;s still reasonable to assume that the IDs are constant, and that tey won&#39;t change without the user&#39;s knowledge, so it&#39;s safe to store in things like settings menus and config files. | [optional][readonly] |
8
+ | **name** | **String** | The user-provided name of the member. | [optional] |
9
+ | **display_name** | **String** | The member&#39;s \&quot;display name\&quot;, which will override the member&#39;s normal name when proxying. | [optional] |
10
+ | **description** | **String** | The user-provided description of the member. May contain rich text in Markdown, including standard Markdown-formatted links, or Discord-formatted emoji/user/channel references. If this member is private, and the request is not authorized with the member&#39;s system token, this field will always be returned as &#x60;null&#x60;. | [optional] |
11
+ | **color** | **String** | The member&#39;s \&quot;color\&quot;, displayed on member cards, as a 6-character hexadecimal color code (no leading #). If this member is private, and the request is not authorized with the member&#39;s system token, this field will always be returned as &#x60;null&#x60;. | [optional] |
12
+ | **birthday** | **Date** | The user-provided birthdate of the member. \&quot;Year-less\&quot; birthdays are supported. In this case, the year should be set to &#x60;0004&#x60;, and that specific year should be special-cased and hidden from the user. Previous versions used the year &#x60;0001&#x60; for the same purpose, and this value may still be both read and written with the API and should be treated the same as &#x60;0004&#x60;. The year &#x60;0004&#x60; was chosen because it is a leap year in the Gregorian calendar, and thus the date &#x60;0004-02-29&#x60; can be properly represented. If this member is private, and the request is not authorized with the member&#39;s system token, this field will always be returned as &#x60;null&#x60;. | [optional] |
13
+ | **pronouns** | **String** | The user-provided pronouns of the member. There is no specific schema, just a freeform text field. If this member is private, and the request is not authorized with the member&#39;s system token, this field will always be returned as &#x60;null&#x60;. | [optional] |
14
+ | **avatar_url** | **String** | A link to the avatar/icon of the member. If used for proxying, the image must be at most 1000 pixels in width *and* height, and at most 1 MiB in size. This restriction is on Discord&#39;s end and is not verified through the API (it&#39;s simply stored as a string). | [optional] |
15
+ | **privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
16
+ | **visibility** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
17
+ | **name_privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
18
+ | **description_privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
19
+ | **avatar_privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
20
+ | **pronouns_privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
21
+ | **birthday_privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
22
+ | **metadata_privacy** | [**PrivacySetting**](PrivacySetting.md) | | [optional] |
23
+ | **proxy_tags** | [**Array&lt;ProxyTag&gt;**](ProxyTag.md) | An unordered list of the member&#39;s proxy tag pairs. It is valid for a member to have any number of proxy tags, including none at all. | [optional] |
24
+ | **prefix** | **String** | Previous versions of the API only supported a single proxy tag pair per member. This field will contain the prefix of the first proxy tag registered, or &#x60;null&#x60; if missing. Setting it will write to the first proxy tag&#39;s prefix, creating it if not present. This field is deprecated and will be removed in API v2. | [optional] |
25
+ | **suffix** | **String** | Previous versions of the API only supported a single proxy tag pair per member. This field will contain the suffix of the first proxy tag registered, or &#x60;null&#x60; if missing. Setting it will write to the first proxy tag&#39;s suffix, creating it if not present. This field is deprecated and will be removed in API v2. | [optional] |
26
+ | **keep_proxy** | **Boolean** | Whether or not to include the used proxy tags in proxied messages. | [optional][default to false] |
27
+ | **created** | **Time** | The creation timestamp of the member. May be returned as &#x60;null&#x60; depending on the value of &#x60;metadata_privacy&#x60; and the request authorization. | [optional][readonly] |
28
+
29
+ ## Example
30
+
31
+ ```ruby
32
+ require 'pluralkit-api'
33
+
34
+ instance = PluralKitAPI::Member.new(
35
+ id: abcde,
36
+ name: Myriad Kit,
37
+ display_name: Myriad &#39;Big Boss&#39; Kit,
38
+ description: Myriad is very cool and rad, and they love snuggling.,
39
+ color: FF0000,
40
+ birthday: Wed Jul 11 00:00:00 UTC 2018,
41
+ pronouns: they/them or xe/xem,
42
+ avatar_url: https://i.imgur.com/Abcdefg.png,
43
+ privacy: null,
44
+ visibility: null,
45
+ name_privacy: null,
46
+ description_privacy: null,
47
+ avatar_privacy: null,
48
+ pronouns_privacy: null,
49
+ birthday_privacy: null,
50
+ metadata_privacy: null,
51
+ proxy_tags: null,
52
+ prefix: {{,
53
+ suffix: }},
54
+ keep_proxy: null,
55
+ created: null
56
+ )
57
+ ```
58
+
@@ -0,0 +1,353 @@
1
+ # PluralKitAPI::MembersApi
2
+
3
+ All URIs are relative to *https://api.pluralkit.me/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_member**](MembersApi.md#create_member) | **POST** /m | Creates a new member in your system. |
8
+ | [**delete_member**](MembersApi.md#delete_member) | **DELETE** /m/{id} | Deletes a member. |
9
+ | [**get_member**](MembersApi.md#get_member) | **GET** /m/{id} | Gets a member by their ID. |
10
+ | [**get_system_members**](MembersApi.md#get_system_members) | **GET** /s/{id}/members | Gets a system&#39;s members. |
11
+ | [**update_member**](MembersApi.md#update_member) | **PATCH** /m/{id} | Updates a member. |
12
+
13
+
14
+ ## create_member
15
+
16
+ > <Member> create_member(member)
17
+
18
+ Creates a new member in your system.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'pluralkit-api'
25
+ # setup authorization
26
+ PluralKitAPI.configure do |config|
27
+ # Configure API key authorization: TokenAuth
28
+ config.api_key['TokenAuth'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ # config.api_key_prefix['TokenAuth'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = PluralKitAPI::MembersApi.new
34
+ member = PluralKitAPI::Member.new # Member |
35
+
36
+ begin
37
+ # Creates a new member in your system.
38
+ result = api_instance.create_member(member)
39
+ p result
40
+ rescue PluralKitAPI::ApiError => e
41
+ puts "Error when calling MembersApi->create_member: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the create_member_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<Member>, Integer, Hash)> create_member_with_http_info(member)
50
+
51
+ ```ruby
52
+ begin
53
+ # Creates a new member in your system.
54
+ data, status_code, headers = api_instance.create_member_with_http_info(member)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <Member>
58
+ rescue PluralKitAPI::ApiError => e
59
+ puts "Error when calling MembersApi->create_member_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **member** | [**Member**](Member.md) | | |
68
+
69
+ ### Return type
70
+
71
+ [**Member**](Member.md)
72
+
73
+ ### Authorization
74
+
75
+ [TokenAuth](../README.md#TokenAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## delete_member
84
+
85
+ > delete_member(id)
86
+
87
+ Deletes a member.
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'pluralkit-api'
94
+ # setup authorization
95
+ PluralKitAPI.configure do |config|
96
+ # Configure API key authorization: TokenAuth
97
+ config.api_key['TokenAuth'] = 'YOUR API KEY'
98
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
99
+ # config.api_key_prefix['TokenAuth'] = 'Bearer'
100
+ end
101
+
102
+ api_instance = PluralKitAPI::MembersApi.new
103
+ id = 'id_example' # String | The ID of the member in question.
104
+
105
+ begin
106
+ # Deletes a member.
107
+ api_instance.delete_member(id)
108
+ rescue PluralKitAPI::ApiError => e
109
+ puts "Error when calling MembersApi->delete_member: #{e}"
110
+ end
111
+ ```
112
+
113
+ #### Using the delete_member_with_http_info variant
114
+
115
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
116
+
117
+ > <Array(nil, Integer, Hash)> delete_member_with_http_info(id)
118
+
119
+ ```ruby
120
+ begin
121
+ # Deletes a member.
122
+ data, status_code, headers = api_instance.delete_member_with_http_info(id)
123
+ p status_code # => 2xx
124
+ p headers # => { ... }
125
+ p data # => nil
126
+ rescue PluralKitAPI::ApiError => e
127
+ puts "Error when calling MembersApi->delete_member_with_http_info: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+ | Name | Type | Description | Notes |
134
+ | ---- | ---- | ----------- | ----- |
135
+ | **id** | **String** | The ID of the member in question. | |
136
+
137
+ ### Return type
138
+
139
+ nil (empty response body)
140
+
141
+ ### Authorization
142
+
143
+ [TokenAuth](../README.md#TokenAuth)
144
+
145
+ ### HTTP request headers
146
+
147
+ - **Content-Type**: Not defined
148
+ - **Accept**: Not defined
149
+
150
+
151
+ ## get_member
152
+
153
+ > <Member> get_member(id)
154
+
155
+ Gets a member by their ID.
156
+
157
+ ### Examples
158
+
159
+ ```ruby
160
+ require 'time'
161
+ require 'pluralkit-api'
162
+ # setup authorization
163
+ PluralKitAPI.configure do |config|
164
+ # Configure API key authorization: TokenAuth
165
+ config.api_key['TokenAuth'] = 'YOUR API KEY'
166
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
167
+ # config.api_key_prefix['TokenAuth'] = 'Bearer'
168
+ end
169
+
170
+ api_instance = PluralKitAPI::MembersApi.new
171
+ id = 'id_example' # String | The ID of the member in question.
172
+
173
+ begin
174
+ # Gets a member by their ID.
175
+ result = api_instance.get_member(id)
176
+ p result
177
+ rescue PluralKitAPI::ApiError => e
178
+ puts "Error when calling MembersApi->get_member: #{e}"
179
+ end
180
+ ```
181
+
182
+ #### Using the get_member_with_http_info variant
183
+
184
+ This returns an Array which contains the response data, status code and headers.
185
+
186
+ > <Array(<Member>, Integer, Hash)> get_member_with_http_info(id)
187
+
188
+ ```ruby
189
+ begin
190
+ # Gets a member by their ID.
191
+ data, status_code, headers = api_instance.get_member_with_http_info(id)
192
+ p status_code # => 2xx
193
+ p headers # => { ... }
194
+ p data # => <Member>
195
+ rescue PluralKitAPI::ApiError => e
196
+ puts "Error when calling MembersApi->get_member_with_http_info: #{e}"
197
+ end
198
+ ```
199
+
200
+ ### Parameters
201
+
202
+ | Name | Type | Description | Notes |
203
+ | ---- | ---- | ----------- | ----- |
204
+ | **id** | **String** | The ID of the member in question. | |
205
+
206
+ ### Return type
207
+
208
+ [**Member**](Member.md)
209
+
210
+ ### Authorization
211
+
212
+ [TokenAuth](../README.md#TokenAuth)
213
+
214
+ ### HTTP request headers
215
+
216
+ - **Content-Type**: Not defined
217
+ - **Accept**: application/json
218
+
219
+
220
+ ## get_system_members
221
+
222
+ > <Array<System>> get_system_members(id)
223
+
224
+ Gets a system's members.
225
+
226
+ If the API token does not belong to this system, this list may exclude any private members in the system.
227
+
228
+ ### Examples
229
+
230
+ ```ruby
231
+ require 'time'
232
+ require 'pluralkit-api'
233
+
234
+ api_instance = PluralKitAPI::MembersApi.new
235
+ id = 'id_example' # String | The ID of the system in question.
236
+
237
+ begin
238
+ # Gets a system's members.
239
+ result = api_instance.get_system_members(id)
240
+ p result
241
+ rescue PluralKitAPI::ApiError => e
242
+ puts "Error when calling MembersApi->get_system_members: #{e}"
243
+ end
244
+ ```
245
+
246
+ #### Using the get_system_members_with_http_info variant
247
+
248
+ This returns an Array which contains the response data, status code and headers.
249
+
250
+ > <Array(<Array<System>>, Integer, Hash)> get_system_members_with_http_info(id)
251
+
252
+ ```ruby
253
+ begin
254
+ # Gets a system's members.
255
+ data, status_code, headers = api_instance.get_system_members_with_http_info(id)
256
+ p status_code # => 2xx
257
+ p headers # => { ... }
258
+ p data # => <Array<System>>
259
+ rescue PluralKitAPI::ApiError => e
260
+ puts "Error when calling MembersApi->get_system_members_with_http_info: #{e}"
261
+ end
262
+ ```
263
+
264
+ ### Parameters
265
+
266
+ | Name | Type | Description | Notes |
267
+ | ---- | ---- | ----------- | ----- |
268
+ | **id** | **String** | The ID of the system in question. | |
269
+
270
+ ### Return type
271
+
272
+ [**Array&lt;System&gt;**](System.md)
273
+
274
+ ### Authorization
275
+
276
+ No authorization required
277
+
278
+ ### HTTP request headers
279
+
280
+ - **Content-Type**: Not defined
281
+ - **Accept**: application/json
282
+
283
+
284
+ ## update_member
285
+
286
+ > <Member> update_member(id, member)
287
+
288
+ Updates a member.
289
+
290
+ ### Examples
291
+
292
+ ```ruby
293
+ require 'time'
294
+ require 'pluralkit-api'
295
+ # setup authorization
296
+ PluralKitAPI.configure do |config|
297
+ # Configure API key authorization: TokenAuth
298
+ config.api_key['TokenAuth'] = 'YOUR API KEY'
299
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
300
+ # config.api_key_prefix['TokenAuth'] = 'Bearer'
301
+ end
302
+
303
+ api_instance = PluralKitAPI::MembersApi.new
304
+ id = 'id_example' # String | The ID of the member in question.
305
+ member = PluralKitAPI::Member.new # Member |
306
+
307
+ begin
308
+ # Updates a member.
309
+ result = api_instance.update_member(id, member)
310
+ p result
311
+ rescue PluralKitAPI::ApiError => e
312
+ puts "Error when calling MembersApi->update_member: #{e}"
313
+ end
314
+ ```
315
+
316
+ #### Using the update_member_with_http_info variant
317
+
318
+ This returns an Array which contains the response data, status code and headers.
319
+
320
+ > <Array(<Member>, Integer, Hash)> update_member_with_http_info(id, member)
321
+
322
+ ```ruby
323
+ begin
324
+ # Updates a member.
325
+ data, status_code, headers = api_instance.update_member_with_http_info(id, member)
326
+ p status_code # => 2xx
327
+ p headers # => { ... }
328
+ p data # => <Member>
329
+ rescue PluralKitAPI::ApiError => e
330
+ puts "Error when calling MembersApi->update_member_with_http_info: #{e}"
331
+ end
332
+ ```
333
+
334
+ ### Parameters
335
+
336
+ | Name | Type | Description | Notes |
337
+ | ---- | ---- | ----------- | ----- |
338
+ | **id** | **String** | The ID of the member in question. | |
339
+ | **member** | [**Member**](Member.md) | | |
340
+
341
+ ### Return type
342
+
343
+ [**Member**](Member.md)
344
+
345
+ ### Authorization
346
+
347
+ [TokenAuth](../README.md#TokenAuth)
348
+
349
+ ### HTTP request headers
350
+
351
+ - **Content-Type**: application/json
352
+ - **Accept**: application/json
353
+