Module: BWAPI::Client::Projects

Includes:
Categories, Data, DataDownload, FacebookQueries, Queries, QueryGroups, Sharing, Signals, StreamDashboards, Summary, Tags, 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/users.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/workflow.rb,
lib/bwapi/client/projects/categories.rb,
lib/bwapi/client/projects/query_groups.rb,
lib/bwapi/client/projects/data_download.rb,
lib/bwapi/client/projects/facebook_queries.rb,
lib/bwapi/client/projects/queries/backfill.rb,
lib/bwapi/client/projects/queries/mentions.rb,
lib/bwapi/client/projects/stream_dashboards.rb,
lib/bwapi/client/projects/queries/date_range.rb,
lib/bwapi/client/projects/stream_dashboards/streams.rb

Overview

Projects module for projects endpoints

Defined Under Namespace

Modules: Categories, Data, DataDownload, FacebookQueries, Queries, QueryGroups, Sharing, Signals, StreamDashboards, Summary, Tags, Users, Workflow

Instance Method Summary collapse

Methods included from Workflow

#workflow

Methods included from Users

#project_users

Methods included from Tags

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

Methods included from QueryGroups

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

Methods included from Queries

#create_query, #delete_query, #get_query, #queries, #queries_summary, #update_query

Methods included from Queries::Mentions

#delete_query_mention, #get_query_mention_content, #update_query_mention

Methods included from Queries::DateRange

#create_date_range, #date_range, #date_ranges, #delete_date_range, #update_date_range

Methods included from Queries::Backfill

#backfills, #create_backfill, #delete_backfill, #get_backfill

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 Sharing

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

Methods included from Summary

#projects_summary

Methods included from Signals

#set_signal_vote, #signals

Methods included from FacebookQueries

#facebook_queries, #get_facebook_queries, #update_facebook_query

Methods included from DataDownload

#create_datadownload, #data_downloads, #get_data_download

Methods included from Data

#data, #data_date_ranges_days, #data_mentions, #update_data_mentions

Methods included from Categories

#categories, #create_category, #delete_category, #update_category

Instance Method Details

#create_project(opts) ⇒ Hashie::Mash

Create new project

Parameters:

  • opts (Hash)

    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:

  • (Hashie::Mash)

    New project



50
51
52
# File 'lib/bwapi/client/projects.rb', line 50

def create_project opts
  post "projects", opts
end

#delete_project(project_id) ⇒ Hashie::Mash

Delete an existing project

Parameters:

  • project_id (Integer)

    id Id of the existing project

Returns:

  • (Hashie::Mash)

    Deleted project



75
76
77
# File 'lib/bwapi/client/projects.rb', line 75

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

#get_project(project_id) ⇒ Hashie::Mash

Get a specific project

Parameters:

  • project_id (Integer)

    Id of the existing project

Returns:

  • (Hashie::Mash)

    Specific project



34
35
36
# File 'lib/bwapi/client/projects.rb', line 34

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

#projects(opts = {}) ⇒ Hashie::Mash

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:

  • (Hashie::Mash)

    All projects



26
27
28
# File 'lib/bwapi/client/projects.rb', line 26

def projects opts={}
  get "projects", opts
end

#update_project(project_id, opts) ⇒ Hashie::Mash

Update an existing project

Parameters:

  • project_id (Integer)

    id Id of the existing project

  • opts (Hash)

    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:

  • (Hashie::Mash)

    Updated project



67
68
69
# File 'lib/bwapi/client/projects.rb', line 67

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