Module: BlommingApi

Defined in:
lib/blomming_api.rb,
lib/blomming_api/help.rb,
lib/blomming_api/config.rb,
lib/blomming_api/version.rb,
lib/blomming_api/buy_endpoints.rb,
lib/blomming_api/oauth_endpoint.rb,
lib/blomming_api/public_helpers.rb,
lib/blomming_api/sell_endpoints.rb,
lib/blomming_api/private_helpers.rb

Defined Under Namespace

Modules: BuyEndpoints, Config, OauthEndpoint, PrivateHelpers, PublicHelpers, SellEndpoints Classes: Client

Constant Summary collapse

AUTHORS =
["Giorgio Robino"]
EMAILS =
["[email protected]"]
SUMMARY =
%q{www.blomming.com social commerce API's wrapper}
DESCRIPTION =
%q{www.blomming.com social commerce API's wrapper: supply a client access layer that embed authentication and communication details, supply API endpoints wrappers.}
HOMEPAGE =
"https://github.com/solyaris/blomming_api"
VERSION =
"0.4.6"

Class Method Summary collapse

Class Method Details

.aboutObject



11
12
13
14
15
16
# File 'lib/blomming_api/help.rb', line 11

def BlommingApi::about
  "\tgem      : blomming_api (v.#{BlommingApi::VERSION})\n"\
  "\tsummary  : #{BlommingApi::SUMMARY}\n"\
  "\tauthors  : #{BlommingApi::AUTHORS.join(',')} (#{BlommingApi::EMAILS.join(',')})\n"\
  "\thomepage : #{BlommingApi::HOMEPAGE}\n"
end

.authentication_helpObject



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/blomming_api/help.rb', line 54

def BlommingApi::authentication_help
  "Authentication set-up\n\nIn order to be granted to access to Blomming API, each client must be identified by some credential values (oauth server authentication). \n\nGet your Blomming API credentials\n=================================\n\nAPI credentials are generated by Blomming tech team for a per 3rd part application use. Please contact [[email protected]](mailto:[email protected]) and explain briefly why do you need them and how do you plan to use Blomming service. Blomming tech team will be happy to give you the full access to API!\n\nBuy Services Authentication\n---------------------------\n\nTo access Blomming APIs, each client must be identified by two credential values required as parameters of initial Blomming OAuth server bearer token request:\n\n- *Application ID*\n- *Secret*\n\nSell Services Authentication\n----------------------------\n\nApplication ID and Secret values, are all you need to use buy services, but in case of sell services, you must authenticate supplying also your Blomming account cusername and password:\n\n- *Username*\n- *Password*\n\n\nSet-up your *blommimg_api* configuration file \n=============================================\n\nUsing the blomming_api gem, a client must be \"initialized\" with a YAML configuration file (.yml), in order to store all Blomming API credentials data and some default API values, among others:\n\n- *domain* (production/staging API urls) \n- *api_version* (API release number)\n\n\nYou have to set-up all data on a blommimg_api YAML configuration file `<your_config_file.yml>`, following these two possible skeletons:\n\n\nConfig file for *BUY services* authentication\n---------------------------------------------\n\nConfig file example: `your/path/to/buy_services_stage_config.yml` :\n\n  description: my account for buy services, access to staging server \n\n  services: buy\n\n  client_id: __copy_here_your_blomming_api_client_id__\n  client_secret: __copy_here_your_blomming_api_client_secret__\n\n  domain: https://blomming-api-staging.herokuapp.com\n  api_version: /v1\n\n  default_currency: USD\n  default_locale: US\n\n  verbose: false\n\n\nConfig file for *SELL services* authentication\n----------------------------------------------\n\nConfig file example `your/path/to/buy_services_prod_config.yml`:\n\n  description: my account for sell services, access to production server  \n\n  services: sell\n\n  client_id: __copy_here_your_blomming_api_client_id__\n  client_secret: __copy_here_your_blomming_api_client_secret__\n\n  username: __copy_here_your_blomming_account_username__\n  password: __copy_here_your_blomming_account_password__\n\n  domain: https://api.blomming.com\n  api_version: /v1\n\n  default_currency: EUR\n  default_locale: it\n\n  verbose: true \n\n"
end

.endpoints_helpObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/blomming_api/help.rb', line 18

def BlommingApi::endpoints_help
  puts "BUY endpoints available methods:\n\n"

  buy_endpoints_methods = BlommingApi::BuyEndpoints.instance_methods(false)
  
  buy_endpoints_methods.each do |method_name|
    display_method_info method_name
  end 

  puts "SELL endpoints available methods:\n\n"

  sell_endpoints_methods = BlommingApi::SellEndpoints.instance_methods(false)
  
  sell_endpoints_methods.each do |method_name|
    display_method_info method_name
  end
end