Class: MailchimpMarketing::AuthorizedAppsApi
- Inherits:
-
Object
- Object
- MailchimpMarketing::AuthorizedAppsApi
- Defined in:
- lib/MailchimpMarketing/api/authorized_apps_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get(app_id = {}, opts = {}) ⇒ InlineResponse2001Apps
Get information about a specific authorized app Get information about a specific authorized application.
-
#get_with_http_info(app_id, opts = {}) ⇒ Array<(InlineResponse2001Apps, Fixnum, Hash)>
Get information about a specific authorized app Get information about a specific authorized application.
-
#initialize(api_client) ⇒ AuthorizedAppsApi
constructor
A new instance of AuthorizedAppsApi.
-
#link(client_details = {}, opts = {}) ⇒ InlineResponse2002
Link your application Retrieve OAuth2-based credentials to associate API calls with your application.
-
#link_with_http_info(client_details, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Link your application Retrieve OAuth2-based credentials to associate API calls with your application.
-
#list(opts = {}) ⇒ InlineResponse2001
Get a list of authorized apps Get a list of an account’s registered, connected applications.
-
#list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Get a list of authorized apps Get a list of an account's registered, connected applications.
Constructor Details
#initialize(api_client) ⇒ AuthorizedAppsApi
Returns a new instance of AuthorizedAppsApi.
19 20 21 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 19 def initialize(api_client) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get(app_id = {}, opts = {}) ⇒ InlineResponse2001Apps
Get information about a specific authorized app Get information about a specific authorized application.
83 84 85 86 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 83 def get(app_id = {}, opts = {}) data, _status_code, _headers = get_with_http_info(app_id, opts) data end |
#get_with_http_info(app_id, opts = {}) ⇒ Array<(InlineResponse2001Apps, Fixnum, Hash)>
Get information about a specific authorized app Get information about a specific authorized application.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 95 def get_with_http_info(app_id, opts = {}) # resource path local_var_path = '/authorized-apps/{app_id}'.sub('{' + 'app_id' + '}', app_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2001Apps') return data, status_code, headers end |
#link(client_details = {}, opts = {}) ⇒ InlineResponse2002
Link your application Retrieve OAuth2-based credentials to associate API calls with your application.
131 132 133 134 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 131 def link(client_details = {}, opts = {}) data, _status_code, _headers = link_with_http_info(client_details, opts) data end |
#link_with_http_info(client_details, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Link your application Retrieve OAuth2-based credentials to associate API calls with your application.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 141 def link_with_http_info(client_details, opts = {}) # resource path local_var_path = '/authorized-apps' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(client_details) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2002') return data, status_code, headers end |
#list(opts = {}) ⇒ InlineResponse2001
Get a list of authorized apps Get a list of an account’s registered, connected applications.
30 31 32 33 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 30 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end |
#list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Get a list of authorized apps Get a list of an account's registered, connected applications.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/MailchimpMarketing/api/authorized_apps_api.rb', line 43 def list_with_http_info(opts = {}) # resource path local_var_path = '/authorized-apps' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2001') return data, status_code, headers end |