arctic-vendor 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +51 -0
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile.lock +2 -3
  5. data/documentation/CHANGELOG.md +137 -0
  6. data/documentation/CODE_OF_CONDUCT.md +46 -0
  7. data/documentation/Gemfile +11 -0
  8. data/documentation/Gemfile.lock +130 -0
  9. data/documentation/LICENSE +13 -0
  10. data/documentation/Procfile +1 -0
  11. data/documentation/README.md +118 -0
  12. data/documentation/build/fonts/slate.eot +0 -0
  13. data/documentation/build/fonts/slate.svg +14 -0
  14. data/documentation/build/fonts/slate.ttf +0 -0
  15. data/documentation/build/fonts/slate.woff +0 -0
  16. data/documentation/build/fonts/slate.woff2 +0 -0
  17. data/documentation/build/images/logo.png +0 -0
  18. data/documentation/build/images/navbar.png +0 -0
  19. data/documentation/build/index.html +564 -0
  20. data/documentation/build/javascripts/all.js +131 -0
  21. data/documentation/build/javascripts/all_nosearch.js +31 -0
  22. data/documentation/build/stylesheets/print.css +1 -0
  23. data/documentation/build/stylesheets/screen.css +1 -0
  24. data/documentation/config.rb +57 -0
  25. data/documentation/deploy.sh +215 -0
  26. data/documentation/font-selection.json +148 -0
  27. data/documentation/lib/multilang.rb +16 -0
  28. data/documentation/lib/nesting_unique_head.rb +22 -0
  29. data/documentation/lib/toc_data.rb +30 -0
  30. data/documentation/lib/unique_head.rb +24 -0
  31. data/documentation/source/fonts/slate.eot +0 -0
  32. data/documentation/source/fonts/slate.svg +14 -0
  33. data/documentation/source/fonts/slate.ttf +0 -0
  34. data/documentation/source/fonts/slate.woff +0 -0
  35. data/documentation/source/fonts/slate.woff2 +0 -0
  36. data/documentation/source/images/logo.png +0 -0
  37. data/documentation/source/images/navbar.png +0 -0
  38. data/documentation/source/includes/_errors.md +17 -0
  39. data/documentation/source/index.html.md +150 -0
  40. data/documentation/source/javascripts/all.js +2 -0
  41. data/documentation/source/javascripts/all_nosearch.js +16 -0
  42. data/documentation/source/javascripts/app/_lang.js +164 -0
  43. data/documentation/source/javascripts/app/_search.js +98 -0
  44. data/documentation/source/javascripts/app/_toc.js +114 -0
  45. data/documentation/source/javascripts/lib/_energize.js +169 -0
  46. data/documentation/source/javascripts/lib/_imagesloaded.min.js +7 -0
  47. data/documentation/source/javascripts/lib/_jquery.highlight.js +108 -0
  48. data/documentation/source/javascripts/lib/_jquery.js +9831 -0
  49. data/documentation/source/javascripts/lib/_lunr.js +1910 -0
  50. data/documentation/source/layouts/layout.erb +116 -0
  51. data/documentation/source/stylesheets/_icon-font.scss +38 -0
  52. data/documentation/source/stylesheets/_normalize.scss +427 -0
  53. data/documentation/source/stylesheets/_rtl.scss +140 -0
  54. data/documentation/source/stylesheets/_variables.scss +103 -0
  55. data/documentation/source/stylesheets/_variables2.scss +147 -0
  56. data/documentation/source/stylesheets/print.css.scss +148 -0
  57. data/documentation/source/stylesheets/screen.css.scss +712 -0
  58. data/lib/arctic/vendor/api.rb +38 -4
  59. data/lib/arctic/vendor/product.rb +47 -0
  60. data/lib/arctic/vendor/vendor.rb +7 -6
  61. data/lib/arctic/vendor/version.rb +1 -1
  62. data/vendor.gemspec +1 -1
  63. metadata +57 -16
@@ -0,0 +1 @@
1
+ web: bundle exec middleman server -p $PORT
@@ -0,0 +1,118 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/lord/img/master/logo-slate.png" alt="Slate: API Documentation Generator" width="226">
3
+ <br>
4
+ <a href="https://travis-ci.org/lord/slate"><img src="https://travis-ci.org/lord/slate.svg?branch=master" alt="Build Status"></a>
5
+ </p>
6
+
7
+ <p align="center">Slate helps you create beautiful, intelligent, responsive API documentation.</p>
8
+
9
+ <p align="center"><img src="https://raw.githubusercontent.com/lord/img/master/screenshot-slate.png" width=700 alt="Screenshot of Example Documentation created with Slate"></p>
10
+
11
+ <p align="center"><em>The example above was created with Slate. Check it out at <a href="https://lord.github.io/slate">lord.github.io/slate</a>.</em></p>
12
+
13
+ Features
14
+ ------------
15
+
16
+ * **Clean, intuitive design** — With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by [Stripe's](https://stripe.com/docs/api) and [PayPal's](https://developer.paypal.com/webapps/developer/docs/api/) API docs. Slate is responsive, so it looks great on tablets, phones, and even in print.
17
+
18
+ * **Everything on a single page** — Gone are the days when your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy.
19
+
20
+ * **Slate is just Markdown** — When you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown — even the code samples are just Markdown code blocks.
21
+
22
+ * **Write code samples in multiple languages** — If your API has bindings in multiple programming languages, you can easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with GitHub Flavored Markdown.
23
+
24
+ * **Out-of-the-box syntax highlighting** for [over 100 languages](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers), no configuration required.
25
+
26
+ * **Automatic, smoothly scrolling table of contents** on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents.
27
+
28
+ * **Let your users update your documentation for you** — By default, your Slate-generated documentation is hosted in a public GitHub repository. Not only does this mean you get free hosting for your docs with GitHub Pages, but it also makes it simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to use GitHub, you're also welcome to host your docs elsewhere.
29
+
30
+ * **RTL Support** Full right-to-left layout for RTL languages such as Arabic, Persian (Farsi), Hebrew etc.
31
+
32
+ Getting started with Slate is super easy! Simply fork this repository and follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](http://lord.github.io/slate).
33
+
34
+ Getting Started with Slate
35
+ ------------------------------
36
+
37
+ ### Prerequisites
38
+
39
+ You're going to need:
40
+
41
+ - **Linux or OS X** — Windows may work, but is unsupported.
42
+ - **Ruby, version 2.3.1 or newer**
43
+ - **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal.
44
+
45
+ ### Getting Set Up
46
+
47
+ 1. Fork this repository on GitHub.
48
+ 2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
49
+ 3. `cd slate`
50
+ 4. Initialize and start Slate. You can either do this locally, or with Vagrant:
51
+
52
+ ```shell
53
+ # either run this to run locally
54
+ bundle install
55
+ bundle exec middleman server
56
+
57
+ # OR run this to run with vagrant
58
+ vagrant up
59
+ ```
60
+
61
+ You can now see the docs at http://localhost:4567. Whoa! That was fast!
62
+
63
+ Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/lord/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/lord/slate/wiki/Deploying-Slate).
64
+
65
+ If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/lord/slate/wiki/Docker).
66
+
67
+ ### Note on JavaScript Runtime
68
+
69
+ For those who don't have JavaScript runtime or are experiencing JavaScript runtime issues with ExecJS, it is recommended to add the [rubyracer gem](https://github.com/cowboyd/therubyracer) to your gemfile and run `bundle` again.
70
+
71
+ Companies Using Slate
72
+ ---------------------------------
73
+
74
+ * [NASA](https://api.nasa.gov)
75
+ * [IBM](https://docs.cloudant.com/api.html)
76
+ * [Sony](http://developers.cimediacloud.com)
77
+ * [Best Buy](https://bestbuyapis.github.io/api-documentation/)
78
+ * [Travis-CI](https://docs.travis-ci.com/api/)
79
+ * [Greenhouse](https://developers.greenhouse.io/harvest.html)
80
+ * [Woocommerce](http://woocommerce.github.io/woocommerce-rest-api-docs/)
81
+ * [Appium](http://appium.io/slate/en/master)
82
+ * [Dwolla](https://docs.dwolla.com/)
83
+ * [Clearbit](https://clearbit.com/docs)
84
+ * [Coinbase](https://developers.coinbase.com/api)
85
+ * [Parrot Drones](http://developer.parrot.com/docs/bebop/)
86
+ * [Fidor Bank](http://docs.fidor.de/)
87
+ * [Scale](https://docs.scaleapi.com/)
88
+
89
+ You can view more in [the list on the wiki](https://github.com/lord/slate/wiki/Slate-in-the-Wild).
90
+
91
+ Questions? Need Help? Found a bug?
92
+ --------------------
93
+
94
+ If you've got questions about setup, deploying, special feature implementation in your fork, or just want to chat with the developer, please feel free to [start a thread in our Spectrum community](https://spectrum.chat/slate)!
95
+
96
+ Found a bug with upstream Slate? Go ahead and [submit an issue](https://github.com/lord/slate/issues). And, of course, feel free to submit pull requests with bug fixes or changes to the `dev` branch.
97
+
98
+ Contributors
99
+ --------------------
100
+
101
+ Slate was built by [Robert Lord](https://lord.io) while interning at [TripIt](https://www.tripit.com/).
102
+
103
+ Thanks to the following people who have submitted major pull requests:
104
+
105
+ - [@chrissrogers](https://github.com/chrissrogers)
106
+ - [@bootstraponline](https://github.com/bootstraponline)
107
+ - [@realityking](https://github.com/realityking)
108
+ - [@cvkef](https://github.com/cvkef)
109
+
110
+ Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
111
+
112
+ Special Thanks
113
+ --------------------
114
+ - [Middleman](https://github.com/middleman/middleman)
115
+ - [jquery.tocify.js](https://github.com/gfranko/jquery.tocify.js)
116
+ - [middleman-syntax](https://github.com/middleman/middleman-syntax)
117
+ - [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages)
118
+ - [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
Binary file
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="slate" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M438.857 877.714q119.429 0 220.286-58.857t159.714-159.714 58.857-220.286-58.857-220.286-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857zM512 165.143v108.571q0 8-5.143 13.429t-12.571 5.429h-109.714q-7.429 0-13.143-5.714t-5.714-13.143v-108.571q0-7.429 5.714-13.143t13.143-5.714h109.714q7.429 0 12.571 5.429t5.143 13.429zM510.857 361.714l10.286 354.857q0 6.857-5.714 10.286-5.714 4.571-13.714 4.571h-125.714q-8 0-13.714-4.571-5.714-3.429-5.714-10.286l9.714-354.857q0-5.714 5.714-10t13.714-4.286h105.714q8 0 13.429 4.286t6 10z" />
11
+ <glyph unicode="&#xe602;" d="M585.143 164.571v91.429q0 8-5.143 13.143t-13.143 5.143h-54.857v292.571q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h54.857v-182.857h-54.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h256q8 0 13.143 5.143t5.143 13.143zM512 676.571v91.429q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
12
+ <glyph unicode="&#xe606;" d="M733.714 531.428q0 16-10.286 26.286l-52 51.429q-10.857 10.857-25.714 10.857t-25.714-10.857l-233.143-232.571-129.143 129.143q-10.857 10.857-25.714 10.857t-25.714-10.857l-52-51.429q-10.286-10.286-10.286-26.286 0-15.429 10.286-25.714l206.857-206.857q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l310.286 310.286q10.286 10.286 10.286 25.714zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
13
+ <glyph unicode="&#xe607;" d="M658.286 475.428q0 105.714-75.143 180.857t-180.857 75.143-180.857-75.143-75.143-180.857 75.143-180.857 180.857-75.143 180.857 75.143 75.143 180.857zM950.857 0q0-29.714-21.714-51.429t-51.429-21.714q-30.857 0-51.429 21.714l-196 195.429q-102.286-70.857-228-70.857-81.714 0-156.286 31.714t-128.571 85.714-85.714 128.571-31.714 156.286 31.714 156.286 85.714 128.571 128.571 85.714 156.286 31.714 156.286-31.714 128.571-85.714 85.714-128.571 31.714-156.286q0-125.714-70.857-228l196-196q21.143-21.143 21.143-51.429z" horiz-adv-x="951" />
14
+ </font></defs></svg>
Binary file
Binary file
@@ -0,0 +1,564 @@
1
+
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
8
+ <title>API Reference</title>
9
+
10
+ <style>
11
+ .highlight table td { padding: 5px; }
12
+ .highlight table pre { margin: 0; }
13
+ .highlight .gh {
14
+ color: #999999;
15
+ }
16
+ .highlight .sr {
17
+ color: #f6aa11;
18
+ }
19
+ .highlight .go {
20
+ color: #888888;
21
+ }
22
+ .highlight .gp {
23
+ color: #555555;
24
+ }
25
+ .highlight .gs {
26
+ }
27
+ .highlight .gu {
28
+ color: #aaaaaa;
29
+ }
30
+ .highlight .nb {
31
+ color: #f6aa11;
32
+ }
33
+ .highlight .cm {
34
+ color: #75715e;
35
+ }
36
+ .highlight .cp {
37
+ color: #75715e;
38
+ }
39
+ .highlight .c1 {
40
+ color: #75715e;
41
+ }
42
+ .highlight .cs {
43
+ color: #75715e;
44
+ }
45
+ .highlight .c, .highlight .cd {
46
+ color: #75715e;
47
+ }
48
+ .highlight .err {
49
+ color: #960050;
50
+ }
51
+ .highlight .gr {
52
+ color: #960050;
53
+ }
54
+ .highlight .gt {
55
+ color: #960050;
56
+ }
57
+ .highlight .gd {
58
+ color: #49483e;
59
+ }
60
+ .highlight .gi {
61
+ color: #49483e;
62
+ }
63
+ .highlight .ge {
64
+ color: #49483e;
65
+ }
66
+ .highlight .kc {
67
+ color: #66d9ef;
68
+ }
69
+ .highlight .kd {
70
+ color: #66d9ef;
71
+ }
72
+ .highlight .kr {
73
+ color: #66d9ef;
74
+ }
75
+ .highlight .no {
76
+ color: #66d9ef;
77
+ }
78
+ .highlight .kt {
79
+ color: #66d9ef;
80
+ }
81
+ .highlight .mf {
82
+ color: #ae81ff;
83
+ }
84
+ .highlight .mh {
85
+ color: #ae81ff;
86
+ }
87
+ .highlight .il {
88
+ color: #ae81ff;
89
+ }
90
+ .highlight .mi {
91
+ color: #ae81ff;
92
+ }
93
+ .highlight .mo {
94
+ color: #ae81ff;
95
+ }
96
+ .highlight .m, .highlight .mb, .highlight .mx {
97
+ color: #ae81ff;
98
+ }
99
+ .highlight .sc {
100
+ color: #ae81ff;
101
+ }
102
+ .highlight .se {
103
+ color: #ae81ff;
104
+ }
105
+ .highlight .ss {
106
+ color: #ae81ff;
107
+ }
108
+ .highlight .sd {
109
+ color: #e6db74;
110
+ }
111
+ .highlight .s2 {
112
+ color: #e6db74;
113
+ }
114
+ .highlight .sb {
115
+ color: #e6db74;
116
+ }
117
+ .highlight .sh {
118
+ color: #e6db74;
119
+ }
120
+ .highlight .si {
121
+ color: #e6db74;
122
+ }
123
+ .highlight .sx {
124
+ color: #e6db74;
125
+ }
126
+ .highlight .s1 {
127
+ color: #e6db74;
128
+ }
129
+ .highlight .s {
130
+ color: #e6db74;
131
+ }
132
+ .highlight .na {
133
+ color: #a6e22e;
134
+ }
135
+ .highlight .nc {
136
+ color: #a6e22e;
137
+ }
138
+ .highlight .nd {
139
+ color: #a6e22e;
140
+ }
141
+ .highlight .ne {
142
+ color: #a6e22e;
143
+ }
144
+ .highlight .nf {
145
+ color: #a6e22e;
146
+ }
147
+ .highlight .vc {
148
+ color: #ffffff;
149
+ }
150
+ .highlight .nn {
151
+ color: #ffffff;
152
+ }
153
+ .highlight .nl {
154
+ color: #ffffff;
155
+ }
156
+ .highlight .ni {
157
+ color: #ffffff;
158
+ }
159
+ .highlight .bp {
160
+ color: #ffffff;
161
+ }
162
+ .highlight .vg {
163
+ color: #ffffff;
164
+ }
165
+ .highlight .vi {
166
+ color: #ffffff;
167
+ }
168
+ .highlight .nv {
169
+ color: #ffffff;
170
+ }
171
+ .highlight .w {
172
+ color: #ffffff;
173
+ }
174
+ .highlight {
175
+ color: #ffffff;
176
+ }
177
+ .highlight .n, .highlight .py, .highlight .nx {
178
+ color: #ffffff;
179
+ }
180
+ .highlight .ow {
181
+ color: #f92672;
182
+ }
183
+ .highlight .nt {
184
+ color: #f92672;
185
+ }
186
+ .highlight .k, .highlight .kv {
187
+ color: #f92672;
188
+ }
189
+ .highlight .kn {
190
+ color: #f92672;
191
+ }
192
+ .highlight .kp {
193
+ color: #f92672;
194
+ }
195
+ .highlight .o {
196
+ color: #f92672;
197
+ }
198
+ </style>
199
+ <link href="stylesheets/screen.css" rel="stylesheet" media="screen" />
200
+ <link href="stylesheets/print.css" rel="stylesheet" media="print" />
201
+ <script src="javascripts/all.js"></script>
202
+ </head>
203
+
204
+ <body class="index" data-languages="[&quot;ruby&quot;,&quot;python&quot;,&quot;php&quot;]">
205
+ <a href="#" id="nav-button">
206
+ <span>
207
+ NAV
208
+ <img src="images/navbar.png" alt="Navbar" />
209
+ </span>
210
+ </a>
211
+ <div class="toc-wrapper">
212
+ <img src="images/logo.png" class="logo" alt="Logo" />
213
+ <div class="lang-selector">
214
+ <a href="#" data-language-name="ruby">ruby</a>
215
+ <a href="#" data-language-name="python">python</a>
216
+ <a href="#" data-language-name="php">php</a>
217
+ </div>
218
+ <div class="search">
219
+ <input type="text" class="search" id="input-search" placeholder="Search">
220
+ </div>
221
+ <ul class="search-results"></ul>
222
+ <div id="toc" class="toc-list-h1">
223
+ <li>
224
+ <a href="#introduction" class="toc-h1 toc-link" data-title="introduction">Introduction</a>
225
+ </li>
226
+ <li>
227
+ <a href="#installation" class="toc-h1 toc-link" data-title="installation">Installation</a>
228
+ </li>
229
+ <li>
230
+ <a href="#setup" class="toc-h1 toc-link" data-title="setup">Setup</a>
231
+ </li>
232
+ <li>
233
+ <a href="#collecting-products" class="toc-h1 toc-link" data-title="collecting-products">Collecting products</a>
234
+ </li>
235
+ <li>
236
+ <a href="#distributing-products" class="toc-h1 toc-link" data-title="distributing-products">Distributing products</a>
237
+ </li>
238
+ <li>
239
+ <a href="#errors" class="toc-h1 toc-link" data-title="errors">Errors</a>
240
+ </li>
241
+ </div>
242
+ <ul class="toc-footer">
243
+ <li><a href='#'>Sign Up for a Developer Key</a></li>
244
+ <li><a href='https://github.com/lord/slate'>Documentation Powered by Slate</a></li>
245
+ </ul>
246
+ </div>
247
+ <div class="page-wrapper">
248
+ <div class="dark-box"></div>
249
+ <div class="content">
250
+ <h1 id='introduction'>Introduction</h1>
251
+ <p>The Arctic Vendor project is a wrapper around the <a href="https://arctic-project.io">Arcic Core API</a>.</p>
252
+
253
+ <p>An Arctic Vendor is an application that connects a marketplace to the Arctic platform.</p>
254
+
255
+ <p>This project looks to simplify setting up these vendors and thus simplifying the onboarding of new marketplaces for the merchangs on the Arctic platform.</p>
256
+
257
+ <p>An Arctic Vendor has two aspects to it: Collection and distribution.</p>
258
+ <h1 id='installation'>Installation</h1>
259
+ <blockquote>
260
+ <p>To install in your project</p>
261
+ </blockquote>
262
+ <pre class="highlight ruby tab-ruby"><code><span class="n">gem</span> <span class="s1">'arctic-vendor'</span><span class="p">,</span> <span class="s1">'~&gt; 2.2'</span>
263
+ </code></pre><pre class="highlight php tab-php"><code>/*
264
+ # composer.json
265
+ {
266
+ "require": {
267
+ "vendor/arctic-vendor": "^2.2"
268
+ }
269
+ }
270
+
271
+ curl -sS https://getcomposer.org/installer | php
272
+
273
+ php composer.phar install
274
+ */
275
+ require 'vendor/autoload.php';
276
+ </code></pre><pre class="highlight python tab-python"><code><span class="n">pip</span> <span class="n">install</span> <span class="n">arctic</span><span class="o">-</span><span class="n">vendor</span>
277
+ </code></pre>
278
+ <p>The Arctic Vendor is available on several different, popular distribution
279
+ platforms including python, <a href="https://rubygems.org/gems/arctic-vendor">ruby</a>, and
280
+ php,or you can download the <a href="https://github.com/YouWeApS/arctic-vendor">ruby source</a>.</p>
281
+ <h1 id='setup'>Setup</h1>
282
+ <p>In order to connect to the Arctici Core API, you need to have a Vendor Token,
283
+ and you need to store this token in the <code>ARCTIC_CORE_API_TOKEN</code> environment
284
+ variable.</p>
285
+
286
+ <p>If you need to run your application against another environment you can override
287
+ the URL by setting the <code>ARCTIC_CORE_API_URL</code> environment variable.</p>
288
+ <h1 id='collecting-products'>Collecting products</h1>
289
+ <blockquote>
290
+ <p>Collect products from the marketplace</p>
291
+ </blockquote>
292
+ <pre class="highlight ruby tab-ruby"><code><span class="no">Arctic</span><span class="o">::</span><span class="no">Vendor</span><span class="p">.</span><span class="nf">collect_products</span> <span class="k">do</span> <span class="o">|</span><span class="n">shop</span><span class="o">|</span>
293
+ <span class="c1"># Connect to the marketplace and retrieve the products for the shop</span>
294
+ <span class="k">end</span>
295
+ </code></pre>
296
+ <p>First, initialize the <code>Vendor.collect_products</code> method to receive each of the
297
+ shops that your vendor should process.</p>
298
+
299
+ <p>Then retrieve the products for that shop, and return them to the block, and the
300
+ Vendor Project will send them to the Core API.</p>
301
+ <h1 id='distributing-products'>Distributing products</h1>
302
+ <blockquote>
303
+ <p>Distribute products to the marketplace</p>
304
+ </blockquote>
305
+ <pre class="highlight ruby tab-ruby"><code><span class="no">Arctic</span><span class="o">::</span><span class="no">Vendor</span><span class="p">.</span><span class="nf">distribute_products</span> <span class="k">do</span> <span class="o">|</span><span class="n">shop</span><span class="p">,</span> <span class="n">products</span><span class="o">|</span>
306
+ <span class="c1"># Connect to the marketplace and publish the products to the shop</span>
307
+ <span class="k">end</span>
308
+ </code></pre>
309
+ <p>First, initialize the <code>Vendor.distribute_products</code> method to receive each of the
310
+ shops and related products to distribute to the marketplace.</p>
311
+
312
+ <p>Then connect to the marketplace and distribute the products to the shop.</p>
313
+
314
+ <!-- # Authentication
315
+
316
+ > To authorize, use this code:
317
+
318
+ ```ruby
319
+ require 'kittn'
320
+
321
+ api = Kittn::APIClient.authorize!('meowmeowmeow')
322
+ ```
323
+
324
+ ```python
325
+ import kittn
326
+
327
+ api = kittn.authorize('meowmeowmeow')
328
+ ```
329
+
330
+ ```shell
331
+ # With shell, you can just pass the correct header with each request
332
+ curl "api_endpoint_here"
333
+ -H "Authorization: meowmeowmeow"
334
+ ```
335
+
336
+ ```javascript
337
+ const kittn = require('kittn');
338
+
339
+ let api = kittn.authorize('meowmeowmeow');
340
+ ```
341
+
342
+ > Make sure to replace `meowmeowmeow` with your API key.
343
+
344
+ Kittn uses API keys to allow access to the API. You can register a new Kittn API key at our [developer portal](http://example.com/developers).
345
+
346
+ Kittn expects for the API key to be included in all API requests to the server in a header that looks like the following:
347
+
348
+ `Authorization: meowmeowmeow`
349
+
350
+ <aside class="notice">
351
+ You must replace <code>meowmeowmeow</code> with your personal API key.
352
+ </aside>
353
+
354
+ # Kittens
355
+
356
+ ## Get All Kittens
357
+
358
+ ```ruby
359
+ require 'kittn'
360
+
361
+ api = Kittn::APIClient.authorize!('meowmeowmeow')
362
+ api.kittens.get
363
+ ```
364
+
365
+ ```python
366
+ import kittn
367
+
368
+ api = kittn.authorize('meowmeowmeow')
369
+ api.kittens.get()
370
+ ```
371
+
372
+ ```shell
373
+ curl "http://example.com/api/kittens"
374
+ -H "Authorization: meowmeowmeow"
375
+ ```
376
+
377
+ ```javascript
378
+ const kittn = require('kittn');
379
+
380
+ let api = kittn.authorize('meowmeowmeow');
381
+ let kittens = api.kittens.get();
382
+ ```
383
+
384
+ > The above command returns JSON structured like this:
385
+
386
+ ```json
387
+ [
388
+ {
389
+ "id": 1,
390
+ "name": "Fluffums",
391
+ "breed": "calico",
392
+ "fluffiness": 6,
393
+ "cuteness": 7
394
+ },
395
+ {
396
+ "id": 2,
397
+ "name": "Max",
398
+ "breed": "unknown",
399
+ "fluffiness": 5,
400
+ "cuteness": 10
401
+ }
402
+ ]
403
+ ```
404
+
405
+ This endpoint retrieves all kittens.
406
+
407
+ ### HTTP Request
408
+
409
+ `GET http://example.com/api/kittens`
410
+
411
+ ### Query Parameters
412
+
413
+ Parameter | Default | Description
414
+ --------- | ------- | -----------
415
+ include_cats | false | If set to true, the result will also include cats.
416
+ available | true | If set to false, the result will include kittens that have already been adopted.
417
+
418
+ <aside class="success">
419
+ Remember — a happy kitten is an authenticated kitten!
420
+ </aside>
421
+
422
+ ## Get a Specific Kitten
423
+
424
+ ```ruby
425
+ require 'kittn'
426
+
427
+ api = Kittn::APIClient.authorize!('meowmeowmeow')
428
+ api.kittens.get(2)
429
+ ```
430
+
431
+ ```python
432
+ import kittn
433
+
434
+ api = kittn.authorize('meowmeowmeow')
435
+ api.kittens.get(2)
436
+ ```
437
+
438
+ ```shell
439
+ curl "http://example.com/api/kittens/2"
440
+ -H "Authorization: meowmeowmeow"
441
+ ```
442
+
443
+ ```javascript
444
+ const kittn = require('kittn');
445
+
446
+ let api = kittn.authorize('meowmeowmeow');
447
+ let max = api.kittens.get(2);
448
+ ```
449
+
450
+ > The above command returns JSON structured like this:
451
+
452
+ ```json
453
+ {
454
+ "id": 2,
455
+ "name": "Max",
456
+ "breed": "unknown",
457
+ "fluffiness": 5,
458
+ "cuteness": 10
459
+ }
460
+ ```
461
+
462
+ This endpoint retrieves a specific kitten.
463
+
464
+ <aside class="warning">Inside HTML code blocks like this one, you can't use Markdown, so use <code>&lt;code&gt;</code> blocks to denote code.</aside>
465
+
466
+ ### HTTP Request
467
+
468
+ `GET http://example.com/kittens/<ID>`
469
+
470
+ ### URL Parameters
471
+
472
+ Parameter | Description
473
+ --------- | -----------
474
+ ID | The ID of the kitten to retrieve
475
+
476
+ ## Delete a Specific Kitten
477
+
478
+ ```ruby
479
+ require 'kittn'
480
+
481
+ api = Kittn::APIClient.authorize!('meowmeowmeow')
482
+ api.kittens.delete(2)
483
+ ```
484
+
485
+ ```python
486
+ import kittn
487
+
488
+ api = kittn.authorize('meowmeowmeow')
489
+ api.kittens.delete(2)
490
+ ```
491
+
492
+ ```shell
493
+ curl "http://example.com/api/kittens/2"
494
+ -X DELETE
495
+ -H "Authorization: meowmeowmeow"
496
+ ```
497
+
498
+ ```javascript
499
+ const kittn = require('kittn');
500
+
501
+ let api = kittn.authorize('meowmeowmeow');
502
+ let max = api.kittens.delete(2);
503
+ ```
504
+
505
+ > The above command returns JSON structured like this:
506
+
507
+ ```json
508
+ {
509
+ "id": 2,
510
+ "deleted" : ":("
511
+ }
512
+ ```
513
+
514
+ This endpoint deletes a specific kitten.
515
+
516
+ ### HTTP Request
517
+
518
+ `DELETE http://example.com/kittens/<ID>`
519
+
520
+ ### URL Parameters
521
+
522
+ Parameter | Description
523
+ --------- | -----------
524
+ ID | The ID of the kitten to delete
525
+
526
+ -->
527
+ <h1 id='errors'>Errors</h1>
528
+ <blockquote>
529
+ <p>Example error response</p>
530
+ </blockquote>
531
+ <pre class="highlight json tab-json"><code><span class="p">{</span><span class="w">
532
+ </span><span class="s2">"error"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Unauthorized"</span><span class="p">,</span><span class="w">
533
+ </span><span class="s2">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Invalid or missing Bearer token Authentication header"</span><span class="w">
534
+ </span><span class="p">}</span><span class="w">
535
+ </span></code></pre>
536
+ <p>The Arctic Core API uses the <a href="httpstatuses.com">HTTP status codes</a> list. Here is some additional explenations for some of the HTTP status codes.</p>
537
+
538
+ <table><thead>
539
+ <tr>
540
+ <th>Error Code</th>
541
+ <th>Meaning</th>
542
+ </tr>
543
+ </thead><tbody>
544
+ <tr>
545
+ <td>401</td>
546
+ <td>Unauthorized -- Your Bearer token is incorrect or missing.</td>
547
+ </tr>
548
+ <tr>
549
+ <td>403</td>
550
+ <td>Forbidden -- Your Bearer token doesn&#39;t have the proper scopes for this action.</td>
551
+ </tr>
552
+ </tbody></table>
553
+
554
+ </div>
555
+ <div class="dark-box">
556
+ <div class="lang-selector">
557
+ <a href="#" data-language-name="ruby">ruby</a>
558
+ <a href="#" data-language-name="python">python</a>
559
+ <a href="#" data-language-name="php">php</a>
560
+ </div>
561
+ </div>
562
+ </div>
563
+ </body>
564
+ </html>