Module: BWAPI::Client::Projects::InstagramQueries

Included in:
BWAPI::Client::Projects
Defined in:
lib/bwapi/client/projects/instagram_queries.rb

Overview

InstagramQueries module for projects/instagramqueries endpoints

Instance Method Summary collapse

Instance Method Details

#create_instagram_channel(project_id, opts = {}) ⇒ Hash

Create a instagram channel in a project

Parameters:

  • project_id (Integer) —

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • averageMonthlyMentions (Integer) —

    Average monthly mentions

  • contextTerms (Array) —

    Content terms of the channel

  • dailyLimit (Integer) —

    Daily limit of the channel

  • description (String) —

    channel description

  • excludedTerms (Array) —

    Excluded terms of the channel

  • id (Integer) —

    Id of the channel

  • includedTerms (Array) —

    Included terms of terms channel

  • industry (String) —

    Industry of the channel

  • instagramScreenName (String) —

    Instagram screen name

  • instagramUserId (String) —

    Instagram user ID

  • isCreatedByWizard (Boolean) —

    Is wizard channel

  • isLanguageAgnostic (Boolean) —

    Language agnostic

  • isLockedQuery (Boolean) —

    Is channel locked

  • languages (Set) —

    channel language

  • lastModificationDate (Date) —

    Last modification date

  • lastModifiedUsername (String) —

    Username of the last user that edited the channel

  • lockedByUsername (String) —

    User who locked channel

  • lockedTime (Date) —

    Time channel was locked

  • name (String) —

    Name of the channel

  • samplePercent (Integer) —

    Sample percent value

  • twitterLimit (Integer) —

    Twitter limit

  • twitterScreenName (String) —

    Tracked Twitter screenname

  • type (String) —

    Type of channel

  • instagramAccessToken (String) —

    Instagram access tocken

Returns:

  • (Hash) —

    New Instagram channel



52
53
54
# File 'lib/bwapi/client/projects/instagram_queries.rb', line 52

def create_instagram_channel(project_id, opts = {})
  post "projects/#{project_id}/instagramqueries", opts
end

#delete_instagram_channel(project_id, query_id) ⇒ Object

Delete an Instagram channel

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of query



92
93
94
# File 'lib/bwapi/client/projects/instagram_queries.rb', line 92

def delete_instagram_channel(project_id, query_id)
  delete "/projects/#{project_id}/instagramqueries/#{query_id}"
end

#get_instagram_channel(project_id, query_id) ⇒ Hash

Get a specific facebook query in a project

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of instagram channel

Returns:

  • (Hash) —

    Specific instagram channel



19
20
21
# File 'lib/bwapi/client/projects/instagram_queries.rb', line 19

def get_instagram_channel(project_id, query_id)
  get "projects/#{project_id}/instagramqueries/#{query_id}"
end

#instagram_channels(project_id) ⇒ Hash

Get all instagram channels in a project

Parameters:

  • project_id (Integer) —

    Id of project

Returns:

  • (Hash) —

    All instagram channels in project



10
11
12
# File 'lib/bwapi/client/projects/instagram_queries.rb', line 10

def instagram_channels(project_id)
  get "projects/#{project_id}/instagramqueries"
end

#update_instagram_channel(project_id, query_id, opts = {}) ⇒ Hash

Update an existing Instagram channels in a project

Parameters:

  • project_id (Integer) —

    Id of project

  • query_id (Integer) —

    Id of query

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

    a customizable set of options

Options Hash (opts):

  • averageMonthlyMentions (Integer) —

    Average monthly mentions

  • contextTerms (Array) —

    Content terms of the channel

  • dailyLimit (Integer) —

    Daily limit of the channel

  • description (String) —

    channel description

  • excludedTerms (Array) —

    Excluded terms of the channel

  • id (Integer) —

    Id of the channel

  • includedTerms (Array) —

    Included terms of terms channel

  • industry (String) —

    Industry of the channel

  • instagramScreenName (String) —

    Instagram screen name

  • instagramUserId (String) —

    Instagram user ID

  • isCreatedByWizard (Boolean) —

    Is wizard channel

  • isLanguageAgnostic (Boolean) —

    Language agnostic

  • isLockedQuery (Boolean) —

    Is channel locked

  • languages (Set) —

    channel language

  • lastModificationDate (Date) —

    Last modification date

  • lastModifiedUsername (String) —

    Username of the last user that edited the channel

  • lockedByUsername (String) —

    User who locked channel

  • lockedTime (Date) —

    Time channel was locked

  • name (String) —

    Name of the channel

  • samplePercent (Integer) —

    Sample percent value

  • twitterLimit (Integer) —

    Twitter limit

  • twitterScreenName (String) —

    Tracked Twitter screenname

  • type (String) —

    Type of channel

Returns:

  • (Hash) —

    Updated instagram channel



84
85
86
# File 'lib/bwapi/client/projects/instagram_queries.rb', line 84

def update_instagram_channel(project_id, query_id, opts = {})
  put "projects/#{project_id}/instagramqueries/#{query_id}", opts
end