Class: MailchimpMarketing::ActivityFeedApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpMarketing/api/activity_feed_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ ActivityFeedApi

Returns a new instance of ActivityFeedApi.


19
20
21
# File 'lib/MailchimpMarketing/api/activity_feed_api.rb', line 19

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client


17
18
19
# File 'lib/MailchimpMarketing/api/activity_feed_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get(opts = {}) ⇒ ActivityFeedRoot

Get information about the activity feed endpoint's resources Get information about the activity feed endpoint's resources.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (ActivityFeedRoot)

26
27
28
29
# File 'lib/MailchimpMarketing/api/activity_feed_api.rb', line 26

def get(opts = {})
  data, _status_code, _headers = get_with_http_info(opts)
  data
end

#get_chimp_chatter(opts = {}) ⇒ InlineResponse200

Chimp Chatter activity Return the Chimp Chatter for this account ordered by most recent

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is *10*. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is *1000* (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is *0*. (default to 0)

Returns:

  • (InlineResponse200)

70
71
72
73
# File 'lib/MailchimpMarketing/api/activity_feed_api.rb', line 70

def get_chimp_chatter(opts = {})
  data, _status_code, _headers = get_chimp_chatter_with_http_info(opts)
  data
end

#get_chimp_chatter_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Chimp Chatter activity Return the Chimp Chatter for this account ordered by most recent

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is *10*. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is *1000*

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is *0*.

Returns:

  • (Array<(InlineResponse200, Fixnum, Hash)>)

    InlineResponse200 data, response status code and response headers


81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/MailchimpMarketing/api/activity_feed_api.rb', line 81

def get_chimp_chatter_with_http_info(opts = {})
  # resource path
  local_var_path = '/activity-feed/chimp-chatter'

  # query parameters
  query_params = {}
  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 => 'InlineResponse200')
  return data, status_code, headers
end

#get_with_http_info(opts = {}) ⇒ Array<(ActivityFeedRoot, Fixnum, Hash)>

Get information about the activity feed endpoint&#39;s resources Get information about the activity feed endpoint&#39;s resources.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ActivityFeedRoot, Fixnum, Hash)>)

    ActivityFeedRoot data, response status code and response headers


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/MailchimpMarketing/api/activity_feed_api.rb', line 35

def get_with_http_info(opts = {})
  # resource path
  local_var_path = '/activity-feed'

  # 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 = 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 => 'ActivityFeedRoot')
  return data, status_code, headers
end