Class: Cotoha::Client

Inherits:
Object
  • Object
show all
Includes:
Connection, Endpoint
Defined in:
lib/cotoha/client.rb

Constant Summary collapse

BASE_URL =
'https://api.ce-cotoha.com'

Instance Method Summary collapse

Methods included from Endpoint::Summary

#summary

Methods included from Endpoint::Sentiment

#sentiment

Methods included from Endpoint::Misrecognition

#detect_misrecognition

Methods included from Endpoint::RemoveFiller

#remove_filler

Methods included from Endpoint::UserAttribute

#user_attribute

Methods included from Endpoint::SentenceType

#sentence_type

Methods included from Endpoint::Similarity

#similarity

Methods included from Endpoint::Keyword

#keywords

Methods included from Endpoint::Coreference

#coreference

Methods included from Endpoint::NamedEntity

#named_entities

Methods included from Endpoint::Parse

#parse

Methods included from Endpoint::AccessToken

#create_access_token

Methods included from Connection

#delete, #get, #post, #put

Constructor Details

#initialize(url: nil, client_id: nil, client_secret: nil, token: nil) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
15
# File 'lib/cotoha/client.rb', line 10

def initialize(url: nil, client_id: nil, client_secret: nil, token: nil)
  @url = url || BASE_URL
  @client_id = client_id
  @client_secret = client_secret
  @token = token
end