Skip to content
This repository was archived by the owner on Mar 8, 2019. It is now read-only.
This repository was archived by the owner on Mar 8, 2019. It is now read-only.

Readme might be missunderstood for single threaded usage #1

@freetwix

Description

@freetwix

Reading the following:

# Or if your code is executed single threaded ...
oauth_token, oauth_token_secret = # load from your db

XingApi::Client.configure do |_|
  _.oauth_token = oauth_token
  _.oauth_token_secret = oauth_token_secret
end

# no client instance needed, because oauth token is set globally
XingApi::User.me

... one might use the configure block in a request based filter (controller.before) to initialize a new request with a correct xing default client.

BUT: having a user without oauth_token and oauth_token_secret will lead to the following behaviour:

# REQUEST "Peter"
XingApi::Client.default_options 
# => { :oauth_token=>"peter_token", :oauth_token_secret=>"peter_secret" }

# REQUEST "Mary"
# controller.before
XingApi::Client.configure do |_|
  _.oauth_token = nil
  _.oauth_token_secret = nil
end

XingApi::Client.default_options 
# => { :oauth_token=>"peter_token", :oauth_token_secret=>"peter_secret" }

just sayin, greets
jochen

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions