Class: BWAPI::Client

Inherits:
Object
  • Object
show all
Includes:
Authentication, Admin, Brandwatch, Client, ErrorCodes, Filters, Logout, Me, OAuth, Ping, Projects, QueryValidation, SSO, TestSearch, User, Connection, Request
Defined in:
lib/bwapi/client.rb,
lib/bwapi/client/me.rb,
lib/bwapi/client/sso.rb,
lib/bwapi/client/ping.rb,
lib/bwapi/client/user.rb,
lib/bwapi/client/admin.rb,
lib/bwapi/client/oauth.rb,
lib/bwapi/client/client.rb,
lib/bwapi/client/logout.rb,
lib/bwapi/client/filters.rb,
lib/bwapi/client/projects.rb,
lib/bwapi/client/brandwatch.rb,
lib/bwapi/client/admin/users.rb,
lib/bwapi/client/error_codes.rb,
lib/bwapi/client/test_search.rb,
lib/bwapi/client/admin/become.rb,
lib/bwapi/client/admin/search.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/query_validation.rb,
lib/bwapi/client/admin/sub_clients.rb,
lib/bwapi/client/brandwatch/become.rb,
lib/bwapi/client/projects/workflow.rb,
lib/bwapi/client/user/notifications.rb,
lib/bwapi/client/admin/users/sharing.rb,
lib/bwapi/client/projects/categories.rb,
lib/bwapi/client/projects/query_groups.rb,
lib/bwapi/client/projects/data_download.rb,
lib/bwapi/client/brandwatch/client_modules.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/queries/date_range.rb

Defined Under Namespace

Modules: Admin, Brandwatch, Client, ErrorCodes, Filters, Logout, Me, OAuth, Ping, Projects, QueryValidation, SSO, TestSearch, User

Instance Method Summary collapse

Methods included from User

#api_role, #ui_role, #update_user, #user

Methods included from User::Notifications

#delete_notification, #notifications, #update_notification

Methods included from QueryValidation

#query_validation, #search_within

Methods included from SSO

#sso

Methods included from Projects

#create_project, #delete_project, #project, #projects, #update_project

Methods included from Projects::Workflow

#workflow

Methods included from Projects::Users

#project_users

Methods included from Projects::Tags

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

Methods included from Projects::QueryGroups

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

Methods included from Projects::Queries

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

Methods included from Projects::Queries::Mentions

#delete_query_mention, #get_query_mention_content, #update_query_mention

Methods included from Projects::Queries::DateRange

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

Methods included from Projects::Queries::Backfill

#backfills, #create_backfill, #delete_backfill, #get_backfill

Methods included from Projects::Sharing

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

Methods included from Projects::Summary

#projects_summary

Methods included from Projects::Signals

#set_signal_vote, #signals

Methods included from Projects::FacebookQueries

#facebook_queries, #get_facebook_queries, #update_facebook_query

Methods included from Projects::DataDownload

#create_datadownload, #data_downloads, #get_data_download

Methods included from Projects::Data

#data, #data_date_ranges_days, #data_mentions, #update_data_mentions

Methods included from Projects::Categories

#categories, #create_category, #delete_category, #update_category

Methods included from Ping

#create_ping, #delete_ping, #get_ping, #patch_ping, #update_ping

Methods included from OAuth

#oauth_refresh_token, #oauth_request, #oauth_token

Methods included from Me

#client_id, #client_name, #me, #user_id

Methods included from Logout

#logout

Methods included from Filters

#filters

Methods included from ErrorCodes

#error_codes

Methods included from Client

#client, #client_modules

Methods included from Brandwatch

#brandwatch_data_download

Methods included from Brandwatch::ClientModules

#brandwatch_client_modules, #update_brandwatch_client_module

Methods included from Brandwatch::Become

#brandwatch_become

Methods included from Admin

#active_queries, #sharing_report

Methods included from Admin::Clients::Users

#client_users, #create_client_user, #get_client_user, #update_client_user

Methods included from Admin::Clients::Users::Sharing

#client_users_sharing, #update_client_users_sharing

Methods included from Admin::Clients::Search

#search_query_name, #search_query_text, #search_rule_text

Methods included from Admin::Clients::SubClients

#client_sub_clients, #create_client_sub_client, #get_client_sub_client, #update_client_sub_client

Methods included from Admin::Clients::Become

#admin_become

Methods included from Request

#delete, #get, #patch, #post, #put

Methods included from Authentication

#api_client?, #application_client?, #authenticated?, #netrc_credentials

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/bwapi/client.rb', line 25

def initialize opts={}
  # Merge opts
  opts = BWAPI.options.merge opts

  # Create instance variables
  Configuration::OPTION_KEYS.each do |k|
    send "#{k}=", opts[k]
  end

  netrc_credentials opts[:netrc]
end