Class: VertxAuthOauth2::FoursquareAuth

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb

Overview

Simplified factory to create an for Foursquare.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


19
20
21
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb', line 19

def @@j_api_type.accept?(obj)
  obj.class == FoursquareAuth
end

+ (::VertxAuthOauth2::OAuth2Auth) create(vertx = nil, clientId = nil, clientSecret = nil, httpClientOptions = nil)

Create a OAuth2Auth provider for Foursquare

Parameters:

  • vertx (::Vertx::Vertx) (defaults to: nil)
  • clientId (String) (defaults to: nil)
    the client id given to you by Foursquare
  • clientSecret (String) (defaults to: nil)
    the client secret given to you by Foursquare
  • httpClientOptions (Hash) (defaults to: nil)
    custom http client options

Returns:

Raises:

  • (ArgumentError)


40
41
42
43
44
45
46
47
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb', line 40

def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
  if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::FoursquareAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
  elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::FoursquareAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
  end
  raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
end

+ (Object) j_api_type



28
29
30
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb', line 28

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



31
32
33
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb', line 31

def self.j_class
  Java::IoVertxExtAuthOauth2Providers::FoursquareAuth.java_class
end

+ (Object) unwrap(obj)



25
26
27
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb', line 25

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



22
23
24
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/foursquare_auth.rb', line 22

def @@j_api_type.wrap(obj)
  FoursquareAuth.new(obj)
end