module BWAPI::Client::Projects
Projects
module for projects endpoints
Public Instance Methods
Copy Published Projects
into current user account
@param project_id [Integer] Id of project @param opts [Hash] options hash of parameters @option opts [Hash] structureOnly should copy only the structure (no backfills) backfills should be run reperatly @return [Hash] Copied project
# File lib/bwapi/client/projects.rb, line 97 def copy_project(project_id, opts = {}) post "projects/#{project_id}/copy", opts end
Create new project
@param opts [Hash] options hash of parameters @option opts [String] name Name of the project @option opts [String] description Description of the project @option opts [String] clientName Client
name of the project @option opts [String] clientId Client
id of the project @option opts [Array] defaultIndustry Default
industry of the project @option opts [Array] defaultLangCodes Default
languages of the project @option opts [Date] creationDate Date the project was created on @option opts [Integer] creationUserId User
ID of the user who created the project @return [Hash] New project
# File lib/bwapi/client/projects.rb, line 61 def create_project(opts = {}) post 'projects', opts end
Delete an existing project
@param project_id [Integer] id Id of the existing project @return [Hash] Deleted project
# File lib/bwapi/client/projects.rb, line 86 def delete_project(project_id) delete "projects/#{project_id}" end
Get a specific project
@param project_id [Integer] Id of the existing project @return [Hash] Specific project
# File lib/bwapi/client/projects.rb, line 45 def get_project(project_id) get "projects/#{project_id}" end
Given a query id retrieve summary statistics for the given Twitter audience
TODO: Add parameters documentation
# File lib/bwapi/client/projects.rb, line 104 def project_twitter_audience_summary(project_id, opts = {}) get "/projects/#{project_id}/twitteraudiencesummary", opts end
Get all projects
@param opts [Hash] options hash of parameters @option opts [Integer] page Page of results to retrieve @option opts [Integer] pageSize Results per page of results @return [Hash] All projects
# File lib/bwapi/client/projects.rb, line 37 def projects(opts = {}) get 'projects', opts end
Update an existing project
@param project_id [Integer] id Id of the existing project @param opts [Hash] options Hash of parameters @option opts [String] name Name of the project @option opts [String] description Description of the project @option opts [String] clientName Client
name of the project @option opts [String] clientId Client
id of the project @option opts [Array] defaultIndustry Default
industry of the project @option opts [Array] defaultLangCodes Default
languages of the project @option opts [Date] creationDate Date the project was created on @option opts [Integer] creationUserId User
ID of the user who created the project @return [Hash] Updated project
# File lib/bwapi/client/projects.rb, line 78 def update_project(project_id, opts = {}) put "projects/#{project_id}", opts end