Module: BWAPI::Client::Projects::FacebookQueries

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

Instance Method Summary collapse

Instance Method Details

#facebook_queries(id) ⇒ Hashie::Mash

Get all facebook queries in project

Parameters:

  • id (Integer)

    Id of project

Returns:

  • (Hashie::Mash)

    All facebook queries in project



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

def facebook_queries id
  get "projects/#{id}/facebookqueries"
end

#get_facebook_queries(project_id, query_id) ⇒ Hashie::Mash Also known as: facebook_query

Get a specific facebook query in project

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of facebook query

Returns:

  • (Hashie::Mash)

    Specific facebook query



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

def get_facebook_queries project_id, query_id
  get "projects/#{project_id}/facebookqueries/#{query_id}"
end

#update_facebook_query(project_id, query_id, opts = {}) ⇒ Hashie::Mash

Update an existing facebook query in project

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of query

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

    options hash of parameters

Options Hash (opts):

  • id (Integer)

    Id of the query

  • facebookPageId (Integer)

    Id of the facebook page

  • name (String)

    Name of the project

  • facebookPageName (String)

    Name of the facebook page

  • facebookPageURL (String)

    URL of the facebook page

  • facebookCrawlComplete (Boolean)

    Facebook initial crawling status

  • dailyLimit (Integer)

    Daily limit of the query

  • twitterLimit (Integer)

    Twitter limit of the query

  • averageMonthlyMentions (Integer)

    Average monthly mentions

  • type (String)

    Query type

  • includedTerms (Array)

    Included terms of terms query

  • contextTerms (Array)

    Content terms of the query

  • excludedTerms (Array)

    Excluded terms of thequery

  • languages (Array)

    Query languages

  • twitterScreenName (String)

    Tracked twitter screen name

  • industry (String)

    Industry of the query

  • creationDate (Date)

    Date the query was created on

  • lastModificationDate (Date)

    Modification date of the query

Returns:

  • (Hashie::Mash)

    Updated query



48
49
50
# File 'lib/bwapi/client/projects/facebook_queries.rb', line 48

def update_facebook_query project_id, query_id, opts={}
  put "projects/#{project_id}/facebookqueries/#{query_id}", opts
end