Module: BWAPI::Client::Projects

Includes:
Alerts, BulkActions, Categories, Data, DataDownload, DecahoseQueries, Demographics, DittoQueries, FacebookQueries, Group, InstagramQueries, PreviewSearch, Queries, Query::MentionFind, QueryGroups, Research, Rules, Sharing, Signals, StreamDashboards, Summary, Tags, TwitterQueries, Users, Workflow
Included in:
BWAPI::Client
Defined in:
lib/bwapi/client/projects.rb,
lib/bwapi/client/projects/data.rb,
lib/bwapi/client/projects/tags.rb,
lib/bwapi/client/projects/group.rb,
lib/bwapi/client/projects/rules.rb,
lib/bwapi/client/projects/users.rb,
lib/bwapi/client/projects/alerts.rb,
lib/bwapi/client/projects/queries.rb,
lib/bwapi/client/projects/sharing.rb,
lib/bwapi/client/projects/signals.rb,
lib/bwapi/client/projects/summary.rb,
lib/bwapi/client/projects/research.rb,
lib/bwapi/client/projects/workflow.rb,
lib/bwapi/client/projects/data/urls.rb,
lib/bwapi/client/projects/categories.rb,
lib/bwapi/client/projects/rules/copy.rb,
lib/bwapi/client/projects/data/volume.rb,
lib/bwapi/client/projects/bulk_actions.rb,
lib/bwapi/client/projects/demographics.rb,
lib/bwapi/client/projects/queries/move.rb,
lib/bwapi/client/projects/query_groups.rb,
lib/bwapi/client/projects/data/audience.rb,
lib/bwapi/client/projects/data/hashtags.rb,
lib/bwapi/client/projects/data/mentions.rb,
lib/bwapi/client/projects/data_download.rb,
lib/bwapi/client/projects/ditto_queries.rb,
lib/bwapi/client/projects/data/emoticons.rb,
lib/bwapi/client/projects/data/headlines.rb,
lib/bwapi/client/projects/preview_search.rb,
lib/bwapi/client/projects/rules/backfill.rb,
lib/bwapi/client/projects/signals/groups.rb,
lib/bwapi/client/projects/categories/copy.rb,
lib/bwapi/client/projects/twitter_queries.rb,
lib/bwapi/client/projects/data/impressions.rb,
lib/bwapi/client/projects/decahose_queries.rb,
lib/bwapi/client/projects/facebook_queries.rb,
lib/bwapi/client/projects/group/site_group.rb,
lib/bwapi/client/projects/queries/backfill.rb,
lib/bwapi/client/projects/queries/mentions.rb,
lib/bwapi/client/projects/instagram_queries.rb,
lib/bwapi/client/projects/query/mentionfind.rb,
lib/bwapi/client/projects/stream_dashboards.rb,
lib/bwapi/client/projects/group/author_group.rb,
lib/bwapi/client/projects/queries/date_range.rb,
lib/bwapi/client/projects/bulk_actions/author.rb,
lib/bwapi/client/projects/data/mentions/notes.rb,
lib/bwapi/client/projects/data/owner_activity.rb,
lib/bwapi/client/projects/data/channel_metrics.rb,
lib/bwapi/client/projects/group/location_group.rb,
lib/bwapi/client/projects/bulk_actions/mentions.rb,
lib/bwapi/client/projects/data/audience_activity.rb,
lib/bwapi/client/projects/data/mentioned_authors.rb,
lib/bwapi/client/projects/stream_dashboards/streams.rb

Overview

Projects module for projects endpoints

Defined Under Namespace

Modules: Alerts, BulkActions, Categories, Data, DataDownload, DecahoseQueries, Demographics, DittoQueries, FacebookQueries, Group, InstagramQueries, PreviewSearch, Queries, Query, QueryGroups, Research, Rules, Sharing, Signals, StreamDashboards, Summary, Tags, TwitterQueries, Users, Workflow

Instance Method Summary collapse

Methods included from Workflow

#workflow

Methods included from Users

#project_users

Methods included from TwitterQueries

#create_twitter_query, #delete_twitter_query, #get_twitter_query, #twitter_queries, #update_twitter_query

Methods included from Tags

#create_tag, #delete_tag, #get_tag, #tags, #update_tag

Methods included from Summary

#projects_summary

Methods included from StreamDashboards

#create_stream_dashboard, #delete_stream_dashboard, #get_stream_dashboard, #get_stream_dashboard_complete, #get_stream_dashboards_summary, #stream_dashboards, #update_stream_dashboard

Methods included from StreamDashboards::Streams

#create_stream, #delete_stream, #get_stream, #get_streams, #update_stream

Methods included from Signals::Groups

#create_signal_group, #delete_signal_group, #get_signal_group, #get_signal_group_signals, #signal_groups, #update_signal_group

Methods included from Sharing

#default_project_sharing, #project_sharing, #project_sharing_user, #update_project_sharing, #update_project_sharing_user

Methods included from Rules

#create_rule, #delete_rule, #get_rule, #rules, #update_rule

Methods included from Rules::Copy

#create_rule_copy

Methods included from Rules::Backfill

#create_rule_backfill

Methods included from Research

#get_research_projects, #update_research_projects

Methods included from QueryGroups

#create_query_group, #delete_query_group, #get_query_group, #query_groups, #update_query_group

Methods included from Query::MentionFind

#mention_find

Methods included from Queries

#create_query, #create_wizard_query, #delete_query, #get_query, #get_wizard_query, #queries, #queries_summary, #update_query, #update_wizard_query

Methods included from Queries::Move

#update_move

Methods included from Queries::Mentions

#delete_query_mention, #get_query_mention_content, #update_query_mention

Methods included from Queries::DateRange

#create_date_range, #date_ranges, #delete_date_range, #get_date_range, #update_date_range

Methods included from Queries::Backfill

#backfills, #create_backfill, #delete_backfill, #get_backfill

Methods included from PreviewSearch

#project_preview_search_author, #project_preview_search_dailymentions, #project_preview_search_history, #project_preview_search_mentions, #project_preview_search_site, #project_preview_search_topauthors, #project_preview_search_topic, #project_preview_search_topics, #project_preview_search_topsites

Methods included from InstagramQueries

#create_instagram_channel, #delete_instagram_channel, #get_instagram_channel, #instagram_channels, #update_instagram_channel

Methods included from Group::SiteGroup

#create_site_group, #delete_site_group, #get_site_group, #site_groups_summary, #update_site_group

Methods included from Group::LocationGroup

#create_location_group, #delete_location_group, #get_location_group, #location_groups_summary, #update_location_group

Methods included from Group::AuthorGroup

#author_groups_summary, #create_author_group, #delete_author_group, #get_author_group, #update_author_group

Methods included from FacebookQueries

#authorise_facebook_queries, #create_facebook_query, #delete_facebook_query, #facebook_queries, #get_facebook_query, #update_facebook_query

Methods included from DittoQueries

#create_ditto_query, #update_ditto_query

Methods included from DecahoseQueries

#create_decahose_query, #decahose_queries, #delete_decahose_query, #get_decahose_query, #update_decahose_query

Methods included from Demographics

#demographics

Methods included from DataDownload

#create_data_download, #data_downloads, #get_data_download

Methods included from Data

#data, #data_headlines

Methods included from Data::Volume

#data_volume_date_ranges_days, #data_volume_queries_top_sites, #data_volume_top_authors_queries, #data_volume_top_facebook_users_queries, #data_volume_top_sites_queries, #data_volume_top_tweeters_queries, #data_volume_topics_compare, #data_volume_topics_queries

Methods included from Data::Urls

#data_urls

Methods included from Data::OwnerActivity

#data_owner_activity_queries

Methods included from Data::Mentions

#data_mentions, #data_mentions_count, #data_mentions_facebook_comments, #data_mentions_facebook_posts, #data_mentions_full_text, #data_mentions_tweets, #update_data_mentions

Methods included from Data::Mentions::Notes

#create_mention_note, #mention_note, #patch_mention_note, #update_mention_note

Methods included from Data::MentionedAuthors

#data_mentioned_authors

Methods included from Data::Impressions

#data_impressions_queries

Methods included from Data::Headlines

#data_headlines

Methods included from Data::Hashtags

#data_hashtags

Methods included from Data::Emoticons

#data_emoticons

Methods included from Data::ChannelMetrics

#data_channel_metrics_queries

Methods included from Data::AudienceActivity

#data_audience_activity_queries

Methods included from Data::Audience

#data_audience_queries

Methods included from Categories

#categories, #create_category, #delete_category, #update_category

Methods included from Categories::Copy

#copy_category

Methods included from BulkActions

#bulk_actions

Methods included from BulkActions::Author

#bulk_edit_author

Methods included from BulkActions::Mentions

#bulk_delete_mentions, #bulk_edit_mentions

Methods included from Alerts

#alerts, #create_alert, #get_alert, #update_alert

Instance Method Details

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

Copy Published Projects into current user account

backfills should be run reperatly

Parameters:

  • project_id (Integer)

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • structureOnly (Hash)

    should copy only the structure (no backfills)

Returns:

  • (Hash)

    Copied project



97
98
99
# File 'lib/bwapi/client/projects.rb', line 97

def copy_project(project_id, opts = {})
  post "projects/#{project_id}/copy", opts
end

#create_project(opts = {}) ⇒ Hash

Create new project

Parameters:

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

    options hash of parameters

Options Hash (opts):

  • name (String)

    Name of the project

  • description (String)

    Description of the project

  • clientName (String)

    Client name of the project

  • clientId (String)

    Client id of the project

  • defaultIndustry (Array)

    Default industry of the project

  • defaultLangCodes (Array)

    Default languages of the project

  • creationDate (Date)

    Date the project was created on

  • creationUserId (Integer)

    User ID of the user who created the project

Returns:

  • (Hash)

    New project



61
62
63
# File 'lib/bwapi/client/projects.rb', line 61

def create_project(opts = {})
  post 'projects', opts
end

#delete_project(project_id) ⇒ Hash

Delete an existing project

Parameters:

  • project_id (Integer)

    id Id of the existing project

Returns:

  • (Hash)

    Deleted project



86
87
88
# File 'lib/bwapi/client/projects.rb', line 86

def delete_project(project_id)
  delete "projects/#{project_id}"
end

#get_project(project_id) ⇒ Hash

Get a specific project

Parameters:

  • project_id (Integer)

    Id of the existing project

Returns:

  • (Hash)

    Specific project



45
46
47
# File 'lib/bwapi/client/projects.rb', line 45

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

#project_twitter_audience_summary(project_id, opts = {}) ⇒ Object

Given a query id retrieve summary statistics for the given Twitter audience

TODO: Add parameters documentation



104
105
106
# File 'lib/bwapi/client/projects.rb', line 104

def project_twitter_audience_summary(project_id, opts = {})
  get "/projects/#{project_id}/twitteraudiencesummary", opts
end

#projects(opts = {}) ⇒ Hash

Get all projects

Parameters:

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

    options hash of parameters

Options Hash (opts):

  • page (Integer)

    Page of results to retrieve

  • pageSize (Integer)

    Results per page of results

Returns:

  • (Hash)

    All projects



37
38
39
# File 'lib/bwapi/client/projects.rb', line 37

def projects(opts = {})
  get 'projects', opts
end

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

Update an existing project

Parameters:

  • project_id (Integer)

    id Id of the existing project

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

    options Hash of parameters

Options Hash (opts):

  • name (String)

    Name of the project

  • description (String)

    Description of the project

  • clientName (String)

    Client name of the project

  • clientId (String)

    Client id of the project

  • defaultIndustry (Array)

    Default industry of the project

  • defaultLangCodes (Array)

    Default languages of the project

  • creationDate (Date)

    Date the project was created on

  • creationUserId (Integer)

    User ID of the user who created the project

Returns:

  • (Hash)

    Updated project



78
79
80
# File 'lib/bwapi/client/projects.rb', line 78

def update_project(project_id, opts = {})
  put "projects/#{project_id}", opts
end