Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ringcentral/slate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: dbljump/api-docs-slate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Jun 27, 2015

  1. Fix Changelog date

    Version 1.2 was released in 2015 not 2014
    johnf committed Jun 27, 2015
    Copy the full SHA
    f359165 View commit details

Commits on Jun 28, 2015

  1. Merge pull request #288 from johnf/patch-1

    Fix Changelog date
    lord committed Jun 28, 2015
    Copy the full SHA
    dcc563b View commit details
  2. Update RedCarpet gem

    lord committed Jun 28, 2015
    Copy the full SHA
    ae3d502 View commit details

Commits on Jul 7, 2015

  1. Copy the full SHA
    ad3b276 View commit details

Commits on Jul 16, 2015

  1. Add OAuth.io to README

    rezanachmad committed Jul 16, 2015
    Copy the full SHA
    0c37f0d View commit details
  2. Merge pull request #303 from rezanachmad/patch-1

    Add OAuth.io to README
    lord committed Jul 16, 2015
    Copy the full SHA
    b9d45b2 View commit details

Commits on Jul 27, 2015

  1. Merge pull request #292 from tripit/dev

    Slate 1.2.1
    @lord my fault, I seemed to have totally missed the emails sent!
    Tariq Islam committed Jul 27, 2015
    Copy the full SHA
    adeb496 View commit details

Commits on Jul 29, 2015

  1. Improved the appearance of code blocks when printing.

    Ivan Matyunin committed Jul 29, 2015
    Copy the full SHA
    5cfcbc7 View commit details
  2. Merge pull request #309 from sibrus/dev

    Improved the appearance of code blocks when printing.
    lord committed Jul 29, 2015
    Copy the full SHA
    ebc8810 View commit details

Commits on Aug 4, 2015

  1. Add Aircall.io to README

    pbechu committed Aug 4, 2015

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    5e60507 View commit details
  2. Merge pull request #313 from pbechu/patch-1

    Add Aircall.io to README
    lord committed Aug 4, 2015
    Copy the full SHA
    eb1c0db View commit details

Commits on Aug 5, 2015

  1. adding supporkit docs as an example of the slate docs

    Dhiren Audich committed Aug 5, 2015
    Copy the full SHA
    87a2950 View commit details
  2. Merge pull request #316 from daudich/f/supporkit-doc-example

    adding supporkit docs as an example
    lord committed Aug 5, 2015
    Copy the full SHA
    b0e0192 View commit details
  3. Remove therubyracer

    dlackty committed Aug 5, 2015
    Copy the full SHA
    befb8d6 View commit details
  4. Merge pull request #318 from dlackty/remove-therubyracer-dev

    Remove therubyracer in favor of system JS runtimes
    lord committed Aug 5, 2015
    Copy the full SHA
    d4e9408 View commit details

Commits on Aug 6, 2015

  1. Copy the full SHA
    83d655b View commit details
  2. Update other dependencies

    dlackty committed Aug 6, 2015
    Copy the full SHA
    47e1861 View commit details
  3. Merge pull request #319 from dlackty/update-gems

    Update gems
    lord committed Aug 6, 2015
    Copy the full SHA
    07c5cce View commit details

Commits on Aug 8, 2015

  1. Use HTTPS for github urls.

    gabrielf committed Aug 8, 2015
    Copy the full SHA
    5d27eaf View commit details
  2. Merge pull request #324 from gabrielf/patch-2

    Use HTTPS for github urls.
    lord committed Aug 8, 2015
    Copy the full SHA
    22ffeba View commit details

Commits on Aug 13, 2015

  1. Copy the full SHA
    ed9e958 View commit details
  2. Fix path to iOS docs

    victorquinn committed Aug 13, 2015
    Copy the full SHA
    977f256 View commit details
  3. Merge pull request #327 from victorquinn/master

    Add SocialRadar to the list of docs sites using Slate
    lord committed Aug 13, 2015
    Copy the full SHA
    c90eab7 View commit details

Commits on Aug 27, 2015

  1. Copy the full SHA
    92d732f View commit details
  2. Merge pull request #331 from pomier/fix-dockerfile

    Fix Dockerfile by installing nodejs
    lord committed Aug 27, 2015
    Copy the full SHA
    7078f7f View commit details

Commits on Sep 23, 2015

  1. Copy the full SHA
    1c508a7 View commit details
  2. Merge pull request #335 from brettporter/patch-1

    Add SafetyCulture API to the list
    lord committed Sep 23, 2015
    Copy the full SHA
    9e42fbb View commit details

Commits on Sep 28, 2015

  1. Copy the full SHA
    fcea901 View commit details
  2. Merge pull request #339 from axsemantics/master

    make middleman pick up changes when run in docker
    lord committed Sep 28, 2015
    Copy the full SHA
    fd27069 View commit details

Commits on Sep 30, 2015

  1. Copy the full SHA
    e0cdc73 View commit details
  2. Merge pull request #344 from realityking/hostingDe

    Add hosting.de API docs to the list
    lord committed Sep 30, 2015
    Copy the full SHA
    787eb79 View commit details

Commits on Oct 6, 2015

  1. Merge branch 'master' into dev

    lord committed Oct 6, 2015
    Copy the full SHA
    236ca52 View commit details
  2. Basic support for Vagrant

    marcguyer committed Oct 6, 2015
    Copy the full SHA
    57aa27c View commit details
  3. Copy the full SHA
    dc45e38 View commit details
  4. Copy the full SHA
    4136f7b View commit details
  5. Update Vagrantfile

    Need git for `rake publish`
    marcguyer committed Oct 6, 2015
    Copy the full SHA
    ce2f2ae View commit details
  6. Update Vagrantfile

    More memory needed for `rake publish`
    marcguyer committed Oct 6, 2015
    Copy the full SHA
    4a3fdfa View commit details

Commits on Oct 8, 2015

  1. Copy the full SHA
    3c1c9c4 View commit details

Commits on Oct 9, 2015

  1. Merge pull request #350 from sproutbox/dev

    Basic Vagrant support. Close #348
    lord committed Oct 9, 2015
    Copy the full SHA
    727ac19 View commit details

Commits on Oct 11, 2015

  1. Copy the full SHA
    150ff8a View commit details

Commits on Oct 12, 2015

  1. Merge pull request #354 from rexposadas/fix-docker-error

    upgraded to wily to remove error from version trusty
    lord committed Oct 12, 2015
    Copy the full SHA
    e9cfc6b View commit details

Commits on Oct 22, 2015

  1. Add blockcypher to examples

    Michael Flaxman committed Oct 22, 2015
    Copy the full SHA
    f0a8dec View commit details
  2. Merge pull request #365 from mflaxman/patch-1

    Add blockcypher to examples
    lord committed Oct 22, 2015
    Copy the full SHA
    ecdce16 View commit details

Commits on Nov 4, 2015

  1. Copy the full SHA
    fb4c2a9 View commit details

Commits on Nov 5, 2015

  1. Copy the full SHA
    01fd020 View commit details
  2. Copy the full SHA
    1e86f82 View commit details
  3. Merge pull request #371 from djpowers/fix-broken-examples

    Fix broken examples
    lord committed Nov 5, 2015
    Copy the full SHA
    964c25a View commit details

Commits on Nov 12, 2015

  1. Added Links to InterServer Slate Implementation

    URL: https://my.interserver.net/apidoc/
    
    Our implementation includes some minor customizations which others mind fight useful including icons for the Language tabs at the top right.
    
    Side Note: The document contents including sample scripts , input/output parameter+descriptions, etc are generated entirely from a script i wrote that parses my SOAP API WSDL file, PHP Source (parsing phpdoc comments), and MySQL Table defintions (parsing field comments) to generate and populate all the neccesary info. At some point (faster if i have any requests for it ) ill make those scripts publicly available after i clean up the source a bit and make it more portable.
    detain committed Nov 12, 2015
    Copy the full SHA
    c763598 View commit details

Commits on Nov 14, 2015

  1. Merge pull request #380 from detain/master

    Added Links to InterServer Slate Implementation
    lord committed Nov 14, 2015
    Copy the full SHA
    1151d00 View commit details

Commits on Nov 16, 2015

  1. Update README.md

    add actionhero docs
    evantahler committed Nov 16, 2015
    Copy the full SHA
    40443b3 View commit details
Showing with 23,825 additions and 538 deletions.
  1. +9 −0 .github/ISSUE_TEMPLATE.md
  2. +5 −0 .github/PULL_REQUEST_TEMPLATE.md
  3. +3 −1 .gitignore
  4. +3 −2 .travis.yml
  5. +41 −2 CHANGELOG.md
  6. +0 −9 CONTRIBUTING.md
  7. +0 −12 Dockerfile
  8. +7 −9 Gemfile
  9. +95 −108 Gemfile.lock
  10. +24 −108 README.md
  11. +0 −6 Rakefile
  12. +39 −0 Vagrantfile
  13. +8 −0 config.rb
  14. +203 −0 deploy.sh
  15. +9 −0 docker-compose.yml
  16. BIN source/images/logo.png
  17. +15 −15 source/includes/_errors.md
  18. +195 −0 source/includes/articles/_index.md
  19. +26 −0 source/includes/articles/_intro.md
  20. +239 −0 source/includes/articles/companies/_create.md
  21. +14 −0 source/includes/articles/companies/_delete.md
  22. +15 −0 source/includes/articles/companies/_errors.md
  23. +336 −0 source/includes/articles/companies/_index.md
  24. +11 −0 source/includes/articles/companies/_intro.md
  25. +334 −0 source/includes/articles/companies/_show.md
  26. +260 −0 source/includes/articles/companies/_update.md
  27. +111 −0 source/includes/articles/companies/aliases/_create.md
  28. +11 −0 source/includes/articles/companies/aliases/_delete.md
  29. +17 −0 source/includes/articles/companies/aliases/_errors.md
  30. +84 −0 source/includes/articles/companies/aliases/_index.md
  31. +36 −0 source/includes/articles/companies/aliases/_intro.md
  32. +64 −0 source/includes/articles/companies/aliases/_show.md
  33. +107 −0 source/includes/articles/companies/aliases/_update.md
  34. +160 −0 source/includes/articles/companies/credits/_create.md
  35. +14 −0 source/includes/articles/companies/credits/_delete.md
  36. +14 −0 source/includes/articles/companies/credits/_errors.md
  37. +78 −0 source/includes/articles/companies/credits/_index.md
  38. +11 −0 source/includes/articles/companies/credits/_intro.md
  39. +111 −0 source/includes/articles/companies/credits/_show.md
  40. +165 −0 source/includes/articles/companies/credits/_update.md
  41. +124 −0 source/includes/articles/companies/kinships/_create.md
  42. +14 −0 source/includes/articles/companies/kinships/_delete.md
  43. +14 −0 source/includes/articles/companies/kinships/_errors.md
  44. +125 −0 source/includes/articles/companies/kinships/_index.md
  45. +5 −0 source/includes/articles/companies/kinships/_intro.md
  46. +99 −0 source/includes/articles/companies/kinships/_show.md
  47. +125 −0 source/includes/articles/companies/kinships/_update.md
  48. +112 −0 source/includes/articles/companies/notes/_create.md
  49. +14 −0 source/includes/articles/companies/notes/_delete.md
  50. +15 −0 source/includes/articles/companies/notes/_errors.md
  51. +100 −0 source/includes/articles/companies/notes/_index.md
  52. +11 −0 source/includes/articles/companies/notes/_intro.md
  53. +81 −0 source/includes/articles/companies/notes/_show.md
  54. +94 −0 source/includes/articles/companies/notes/_update.md
  55. +182 −0 source/includes/articles/games/_create.md
  56. +14 −0 source/includes/articles/games/_delete.md
  57. +11 −0 source/includes/articles/games/_errors.md
  58. +92 −0 source/includes/articles/games/_index.md
  59. +11 −0 source/includes/articles/games/_intro.md
  60. +214 −0 source/includes/articles/games/_show.md
  61. +234 −0 source/includes/articles/games/_update.md
  62. +119 −0 source/includes/articles/games/aliases/_create.md
  63. +11 −0 source/includes/articles/games/aliases/_delete.md
  64. +15 −0 source/includes/articles/games/aliases/_errors.md
  65. +88 −0 source/includes/articles/games/aliases/_index.md
  66. +25 −0 source/includes/articles/games/aliases/_intro.md
  67. +70 −0 source/includes/articles/games/aliases/_show.md
  68. +114 −0 source/includes/articles/games/aliases/_update.md
  69. +131 −0 source/includes/articles/games/notes/_create.md
  70. +14 −0 source/includes/articles/games/notes/_delete.md
  71. +16 −0 source/includes/articles/games/notes/_errors.md
  72. +75 −0 source/includes/articles/games/notes/_index.md
  73. +11 −0 source/includes/articles/games/notes/_intro.md
  74. +88 −0 source/includes/articles/games/notes/_show.md
  75. +138 −0 source/includes/articles/games/notes/_update.md
  76. +117 −0 source/includes/articles/games/version_releases/_create.md
  77. +14 −0 source/includes/articles/games/version_releases/_delete.md
  78. +11 −0 source/includes/articles/games/version_releases/_errors.md
  79. +128 −0 source/includes/articles/games/version_releases/_index.md
  80. +11 −0 source/includes/articles/games/version_releases/_intro.md
  81. +91 −0 source/includes/articles/games/version_releases/_show.md
  82. +111 −0 source/includes/articles/games/version_releases/_update.md
  83. +155 −0 source/includes/articles/games/versions/_create.md
  84. +14 −0 source/includes/articles/games/versions/_delete.md
  85. +13 −0 source/includes/articles/games/versions/_errors.md
  86. +136 −0 source/includes/articles/games/versions/_index.md
  87. +11 −0 source/includes/articles/games/versions/_intro.md
  88. +126 −0 source/includes/articles/games/versions/_show.md
  89. +148 −0 source/includes/articles/games/versions/_update.md
  90. +178 −0 source/includes/articles/peer_reviews/_create.md
  91. +13 −0 source/includes/articles/peer_reviews/_errors.md
  92. +5 −0 source/includes/articles/peer_reviews/_intro.md
  93. +187 −0 source/includes/articles/peer_reviews/_update.md
  94. +266 −0 source/includes/articles/people/_create.md
  95. +14 −0 source/includes/articles/people/_delete.md
  96. +29 −0 source/includes/articles/people/_errors.md
  97. +165 −0 source/includes/articles/people/_index.md
  98. +11 −0 source/includes/articles/people/_intro.md
  99. +168 −0 source/includes/articles/people/_show.md
  100. +238 −0 source/includes/articles/people/_update.md
  101. +137 −0 source/includes/articles/people/aliases/_create.md
  102. +11 −0 source/includes/articles/people/aliases/_delete.md
  103. +19 −0 source/includes/articles/people/aliases/_errors.md
  104. +54 −0 source/includes/articles/people/aliases/_index.md
  105. +3 −0 source/includes/articles/people/aliases/_intro.md
  106. +89 −0 source/includes/articles/people/aliases/_show.md
  107. +131 −0 source/includes/articles/people/aliases/_update.md
  108. +160 −0 source/includes/articles/people/credits/_create.md
  109. +14 −0 source/includes/articles/people/credits/_delete.md
  110. +14 −0 source/includes/articles/people/credits/_errors.md
  111. +78 −0 source/includes/articles/people/credits/_index.md
  112. +11 −0 source/includes/articles/people/credits/_intro.md
  113. +127 −0 source/includes/articles/people/credits/_show.md
  114. +165 −0 source/includes/articles/people/credits/_update.md
  115. +112 −0 source/includes/articles/people/notes/_create.md
  116. +14 −0 source/includes/articles/people/notes/_delete.md
  117. +15 −0 source/includes/articles/people/notes/_errors.md
  118. +69 −0 source/includes/articles/people/notes/_index.md
  119. +11 −0 source/includes/articles/people/notes/_intro.md
  120. +81 −0 source/includes/articles/people/notes/_show.md
  121. +86 −0 source/includes/articles/people/notes/_update.md
  122. +94 −0 source/includes/genres/_create.md
  123. +14 −0 source/includes/genres/_delete.md
  124. +15 −0 source/includes/genres/_errors.md
  125. +114 −0 source/includes/genres/_index.md
  126. +11 −0 source/includes/genres/_intro.md
  127. +88 −0 source/includes/genres/_show.md
  128. +95 −0 source/includes/genres/_update.md
  129. +178 −0 source/includes/intro.md
  130. +206 −0 source/includes/media/images/_create.md
  131. +14 −0 source/includes/media/images/_delete.md
  132. +26 −0 source/includes/media/images/_errors.md
  133. +124 −0 source/includes/media/images/_index.md
  134. +13 −0 source/includes/media/images/_intro.md
  135. +115 −0 source/includes/media/images/_show.md
  136. +140 −0 source/includes/media/images/_update.md
  137. +69 −0 source/includes/media/licenses/_create.md
  138. +11 −0 source/includes/media/licenses/_delete.md
  139. +13 −0 source/includes/media/licenses/_errors.md
  140. +118 −0 source/includes/media/licenses/_index.md
  141. +31 −0 source/includes/media/licenses/_intro.md
  142. +55 −0 source/includes/media/licenses/_show.md
  143. +70 −0 source/includes/media/licenses/_update.md
  144. +161 −0 source/includes/places/_create.md
  145. +14 −0 source/includes/places/_delete.md
  146. +32 −0 source/includes/places/_errors.md
  147. +159 −0 source/includes/places/_index.md
  148. +23 −0 source/includes/places/_intro.md
  149. +395 −0 source/includes/places/_show.md
  150. +163 −0 source/includes/places/_update.md
  151. +237 −0 source/includes/places/children/_index.md
  152. +166 −0 source/includes/places/regions/_index.md
  153. +151 −0 source/includes/platforms/_create.md
  154. +14 −0 source/includes/platforms/_delete.md
  155. +18 −0 source/includes/platforms/_errors.md
  156. +145 −0 source/includes/platforms/_index.md
  157. +13 −0 source/includes/platforms/_intro.md
  158. +104 −0 source/includes/platforms/_show.md
  159. +130 −0 source/includes/platforms/_update.md
  160. +106 −0 source/includes/users/_create.md
  161. +14 −0 source/includes/users/_delete.md
  162. +34 −0 source/includes/users/_errors.md
  163. +125 −0 source/includes/users/_index.md
  164. +11 −0 source/includes/users/_intro.md
  165. +111 −0 source/includes/users/_show.md
  166. +152 −0 source/includes/users/_update.md
  167. +43 −0 source/includes/users/activations/_create.md
  168. +12 −0 source/includes/users/activations/_intro.md
  169. +116 −0 source/includes/users/activations/_update.md
  170. +115 −0 source/includes/users/authentications/_create.md
  171. +3 −0 source/includes/users/authentications/_intro.md
  172. +42 −0 source/includes/users/passwords/_create.md
  173. +8 −0 source/includes/users/passwords/_intro.md
  174. +54 −0 source/includes/users/passwords/_update.md
  175. +171 −0 source/index.html.md.erb
  176. +0 −168 source/index.md
  177. +4 −0 source/javascripts/app/_lang.js
  178. +1 −0 source/javascripts/app/_search.js
  179. +11 −4 source/javascripts/app/_toc.js
  180. +7 −0 source/javascripts/lib/_imagesloaded.min.js
  181. +9,831 −0 source/javascripts/lib/_jquery.js
  182. +8 −13 source/layouts/layout.erb
  183. 0 source/stylesheets/{_normalize.css → _normalize.scss}
  184. +0 −27 source/stylesheets/_syntax.scss.erb
  185. +40 −44 source/stylesheets/_variables.scss
  186. +6 −1 source/stylesheets/print.css.scss
  187. +20 −9 source/stylesheets/screen.css.scss
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
If this is a question or feature request, make sure to:

- [ ] The title starts with `Question:` or `Feature:`.

If this is an bug report, not a question, make sure to:

- [ ] I'm not running Windows (which is unsupported), or if I am, I can confirm this issue appears on another platform, or Vagrant.
- [ ] This issue appears in the latest `dev` branch.
- [ ] I've included my browser and Ruby version in this issue.
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
!!!!! STOP AND READ !!!!!

If the dropdown above says "base fork: lord/master", you are submitting your change to ALL USERS OF SLATE, not just your company. This is probably not what you want. Click "base fork" to change it to the right place.

If you're actually trying to submit a change to upstream Slate, please submit to our dev branch, PRs sent to the master branch are generally rejected.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -14,9 +14,11 @@ tmp
*.DS_STORE
build/
.cache
.vagrant
.sass-cache

# YARD artifacts
.yardoc
_yardoc
doc/
.idea/
.idea/
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ sudo: false
language: ruby

rvm:
- 1.9.3
- 2.0.0
- 2.2.5
- 2.3.1

cache: bundler
script: bundle exec middleman build
43 changes: 41 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,47 @@
# Changelog

## Version 1.4.0

*November 24, 2016*

- Upgrade Middleman and Rouge gems, should hopefully solve a number of bugs
- Update some links in README
- Fix broken Vagrant startup script
- Fix some problems with deploy.sh help message
- Fix bug with language tabs not hiding properly if no error
- Add `!default` to SASS variables
- Fix bug with logo margin
- Bump tested Ruby versions in .travis.yml

## Version 1.3.3

*June 11, 2016*

Documentation and example changes.

## Version 1.3.2

*February 3, 2016*

A small bugfix for slightly incorrect background colors on code samples in some cases.

## Version 1.3.1

*January 31, 2016*

A small bugfix for incorrect whitespace in code blocks.

## Version 1.3

*January 27, 2016*

We've upgraded Middleman and a number of other dependencies, which should fix quite a few bugs.

Instead of `rake build` and `rake deploy`, you should now run `bundle exec middleman build --clean` to build your server, and `./deploy.sh` to deploy it to Github Pages.

## Version 1.2

*June 20, 2014*
*June 20, 2015*

**Fixes:**

@@ -21,7 +60,7 @@

## Version 1.1

*July 27th, 2014*
*July 27, 2014*

**Fixes:**

9 changes: 0 additions & 9 deletions CONTRIBUTING.md

This file was deleted.

12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

16 changes: 7 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
source 'https://rubygems.org'

# Middleman
gem 'middleman', '~>3.3.10'
gem 'middleman-gh-pages', '~> 0.0.3'
gem 'middleman-syntax', '~> 2.0.0'
gem 'middleman-autoprefixer', '~> 2.4.4'
gem 'rouge', '~> 1.9.0'
gem 'redcarpet', '~> 3.3.1'

gem 'rake', '~> 10.4.2'
gem 'therubyracer', '~> 0.12.1', platforms: :ruby
gem 'middleman', '~>4.1.0'
gem 'middleman-syntax', '~> 3.0.0'
gem 'middleman-autoprefixer', '~> 2.7.0'
gem "middleman-sprockets", "~> 4.0.0"
gem 'rouge', '~> 2.0.5'
gem 'redcarpet', '~> 3.3.2'
gem 'js_regex'
203 changes: 95 additions & 108 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,140 +1,127 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.1.11)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
activesupport (5.0.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
autoprefixer-rails (5.2.0.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
autoprefixer-rails (6.7.7.2)
execjs
json
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.4)
backports (3.8.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
compass (1.0.3)
chunky_png (~> 1.2)
compass-core (~> 1.0.2)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.3)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
coffee-script-source (1.12.2)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
concurrent-ruby (1.0.5)
contracts (0.13.0)
dotenv (2.2.0)
erubis (2.7.0)
execjs (2.5.2)
ffi (1.9.8)
haml (4.0.6)
execjs (2.7.0)
fast_blank (1.0.0)
fastimage (2.1.0)
ffi (1.9.18)
haml (5.0.0)
temple (>= 0.8.0)
tilt
hike (1.2.3)
hitimes (1.2.2)
hooks (0.4.0)
uber (~> 0.0.4)
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.5.5)
i18n (0.7.0)
json (1.8.3)
kramdown (1.7.0)
libv8 (3.16.14.7)
listen (2.10.1)
celluloid (~> 0.16.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
middleman (3.3.12)
js_regex (1.2.3)
regexp_parser (>= 0.3.6, <= 0.5.0)
kramdown (1.13.2)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.15.0)
middleman (4.1.14)
coffee-script (~> 2.2)
compass (>= 1.0.0, < 2.0.0)
compass-import-once (= 1.0.5)
execjs (~> 2.0)
haml (>= 4.0.5)
kramdown (~> 1.2)
middleman-core (= 3.3.12)
middleman-sprockets (>= 3.1.2)
middleman-cli (= 4.1.14)
middleman-core (= 4.1.14)
sass (>= 3.4.0, < 4.0)
uglifier (~> 2.5)
middleman-autoprefixer (2.4.4)
autoprefixer-rails (~> 5.2.0)
middleman-autoprefixer (2.7.1)
autoprefixer-rails (>= 6.5.2, < 7.0.0)
middleman-core (>= 3.3.3)
middleman-core (3.3.12)
activesupport (~> 4.1.0)
middleman-cli (4.1.14)
thor (>= 0.17.0, < 2.0)
middleman-core (4.1.14)
activesupport (>= 4.2, < 5.1)
addressable (~> 2.3)
backports (~> 3.6)
bundler (~> 1.1)
contracts (~> 0.13.0)
dotenv
erubis
hooks (~> 0.3)
execjs (~> 2.0)
fast_blank
fastimage (~> 2.0)
hamster (~> 3.0)
hashie (~> 3.4)
i18n (~> 0.7.0)
listen (>= 2.7.9, < 3.0)
padrino-helpers (~> 0.12.3)
rack (>= 1.4.5, < 2.0)
rack-test (~> 0.6.2)
thor (>= 0.15.2, < 2.0)
tilt (~> 1.4.1, < 2.0)
middleman-gh-pages (0.0.3)
rake (> 0.9.3)
middleman-sprockets (3.4.2)
middleman-core (>= 3.3)
sprockets (~> 2.12.1)
sprockets-helpers (~> 1.1.0)
sprockets-sass (~> 1.3.0)
middleman-syntax (2.0.0)
middleman-core (~> 3.2)
rouge (~> 1.0)
minitest (5.7.0)
multi_json (1.11.1)
padrino-helpers (0.12.5)
listen (~> 3.0.0)
memoist (~> 0.14)
padrino-helpers (~> 0.13.0)
parallel
rack (>= 1.4.5, < 3)
sass (>= 3.4)
servolux
tilt (~> 2.0)
uglifier (~> 3.0)
middleman-sprockets (4.0.0)
middleman-core (~> 4.0)
sprockets (>= 3.0)
middleman-syntax (3.0.0)
middleman-core (>= 3.2)
rouge (~> 2.0)
minitest (5.10.1)
padrino-helpers (0.13.3.3)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.12.5)
tilt (~> 1.4.1)
padrino-support (0.12.5)
padrino-support (= 0.13.3.3)
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.3)
activesupport (>= 3.1)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
parallel (1.11.1)
public_suffix (2.0.5)
rack (2.0.1)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
redcarpet (3.3.1)
ref (1.0.5)
rouge (1.9.0)
sass (3.4.14)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-helpers (1.1.0)
sprockets (~> 2.0)
sprockets-sass (1.3.1)
sprockets (~> 2.0)
tilt (~> 1.1)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
timers (4.0.1)
hitimes
tzinfo (1.2.2)
redcarpet (3.3.4)
regexp_parser (0.4.3)
rouge (2.0.7)
sass (3.4.23)
servolux (0.13.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
temple (0.8.0)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uber (0.0.13)
uglifier (2.7.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)

PLATFORMS
ruby

DEPENDENCIES
middleman (~> 3.3.10)
middleman-autoprefixer (~> 2.4.4)
middleman-gh-pages (~> 0.0.3)
middleman-syntax (~> 2.0.0)
rake (~> 10.4.2)
redcarpet (~> 3.3.1)
rouge (~> 1.9.0)
therubyracer (~> 0.12.1)
js_regex
middleman (~> 4.1.0)
middleman-autoprefixer (~> 2.7.0)
middleman-sprockets (~> 4.0.0)
middleman-syntax (~> 3.0.0)
redcarpet (~> 3.3.2)
rouge (~> 2.0.5)

BUNDLED WITH
1.13.1
132 changes: 24 additions & 108 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,122 +1,38 @@
Slate
========
# Dbljump API docs powered by Slate

[![Build Status](https://travis-ci.org/tripit/slate.svg?branch=master)](https://travis-ci.org/tripit/slate) [![Dependency Status](https://gemnasium.com/tripit/slate.png)](https://gemnasium.com/tripit/slate)
Note that setup instructions are based on those in the [Slate readme at Github](https://github.com/lord/slate). Check there for the latest.

Slate helps you create beautiful API documentation. Think of it as an intelligent, responsive documentation template for your API.
## Prerequisites

<img src="https://dl.dropboxusercontent.com/u/95847291/github%20images/slate/slate_screenshot_new.png" width=700 alt="Screenshot of Example Documentation created with Slate">
+ **Linux or OS X** — Windows may work, but is unsupported.
+ **Ruby, version 2.2.5 or newer**
+ **Bundler** — If Ruby is already installed, but the bundle command doesn't work, just run gem install bundler in a terminal.

*The example above was created with Slate. Check it out at [tripit.github.io/slate](http://tripit.github.io/slate).*
## Installation

Features
------------
1. Clone this repository using the instructions on Bitbucket
2. Go to your clone's folder, e.g. `cd ~/slate`
3. Bundle and start the server

* **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 print.

* **Everything on a single page** — gone are the days where 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.

* **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!

* **Write code samples in multiple languages** — if your API has bindings in multiple programming languages, you 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!

* **Out-of-the-box syntax highlighting** for [almost 60 languages](http://rouge.jayferd.us/demo), no configuration required.

* **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.

* **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's 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, you're welcome to not use Github and host your docs elsewhere!

Getting starting with Slate is super easy! Simply fork this repository, and then 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://tripit.github.io/slate).

<!--As an example, you can check out the [TripIt API docs](http://tripit.github.io/api), which we create with Slate. You can also view the source of the [markdown file used to generate it](http://github.com/tripit/api/blob/master/source/index.md).-->

Getting Started with Slate
------------------------------

### Prerequisites

You're going to need:

- **Linux or OS X** — Windows may work, but is unsupported.
- **Ruby, version 1.9.3 or newer**
- **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal.

### Getting Set Up

1. Fork this repository on Github.
2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
3. `cd slate`
4. Install all dependencies: `bundle install`
5. Start the test server: `bundle exec middleman server`

Or use the included Dockerfile! (must install Docker first)

```shell
docker build -t slate .
docker run -d -p 4567:4567 slate
```
#either run this to run locally
bundle install
middleman server
You can now see the docs at <http://localhost:4567>. Whoa! That was fast!

*Note: if you're using the Docker setup on OSX, the docs will be
availalable at the output of `boot2docker ip` instead of `localhost:4567`.*

Now that Slate is all set up your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/tripit/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/tripit/slate/wiki/Deploying-Slate).

Examples of Slate in the Wild
---------------------------------

* [Travis-CI's API docs](http://docs.travis-ci.com/api/)
* [Mozilla's localForage docs](http://mozilla.github.io/localForage/)
* [Mozilla Recroom](http://mozilla.github.io/recroom/)
* [ChaiOne Gameplan API docs](http://chaione.github.io/gameplanb2b/#introduction)
* [Drcaban's Build a Quine tutorial](http://drcabana.github.io/build-a-quine/#introduction)
* [PricePlow API docs](https://www.priceplow.com/api/documentation)
* [Emerging Threats API docs](http://apidocs.emergingthreats.net/)
* [Appium docs](http://appium.io/slate/en/master)
* [Golazon Developer](http://developer.golazon.com)
* [Dwolla API docs](https://docs.dwolla.com/)
* [RozpisyZapasu API docs](http://www.rozpisyzapasu.cz/dev/api/)
* [Codestar Framework Docs](http://codestarframework.com/documentation/)
* [Buddycloud API](http://buddycloud.com/api)
* [Crafty Clicks API](https://craftyclicks.co.uk/api/)
* [Paracel API Reference](http://paracel.io/docs/api_reference.html)
* [Switch Payments Documentation](http://switchpayments.com/docs/) & [API](http://switchpayments.com/developers/)
* [Coinbase API Reference](https://developers.coinbase.com/api)
* [Whispir.io API](https://whispir.github.io/api)
* [NASA API](https://data.nasa.gov/developer/external/planetary/)
* [CardPay API](https://developers.cardpay.com/)
* [IBM Cloudant](https://docs-testb.cloudant.com/content-review/_design/couchapp/index.html)
* [Bitrix basis components](http://bbc.bitrix.expert/)
* [viagogo API Documentation](http://developer.viagogo.net/)
* [Fidor Bank API Documentation](http://docs.fidor.de/)
* [Market Prophit API Documentation](http://developer.marketprophit.com/)

(Feel free to add your site to this list in a pull request!)

Need Help? Found a bug?
--------------------

Just [submit a issue](https://github.com/tripit/slate/issues) to the Slate Github if you need any help. And, of course, feel free to submit pull requests with bug fixes or changes.

# OR run this to run with vagrant
vagrant up
```

Contributors
--------------------
## Local

Slate was built by [Robert Lord](https://lord.io) while at [TripIt](http://tripit.com).
With the server running, you can now see the docs at http://localhost:4567.

Thanks to the following people who have submitted major pull requests:
## Publishing to GitHub Pages

- [@chrissrogers](https://github.com/chrissrogers)
- [@bootstraponline](https://github.com/bootstraponline)
- [@realityking](https://github.com/realityking)
Commit changes to master branch, then run the deploy script:

Also, thanks to [Sauce Labs](http://saucelabs.com) for helping sponsor the project.
```
./deploy.sh
```

Special Thanks
--------------------
- [Middleman](https://github.com/middleman/middleman)
- [jquery.tocify.js](https://github.com/gfranko/jquery.tocify.js)
- [middleman-syntax](https://github.com/middleman/middleman-syntax)
- [middleman-gh-pages](https://github.com/neo/middleman-gh-pages)
- [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
Re-set the custom domain name (http://docs.dbljump.com), as the deploy script removes it.
6 changes: 0 additions & 6 deletions Rakefile

This file was deleted.

39 changes: 39 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 4567, host: 4567

config.vm.provision "bootstrap",
type: "shell",
inline: <<-SHELL
sudo apt-get update
sudo apt-get install -yq ruby2.0 ruby2.0-dev pkg-config build-essential nodejs git libxml2-dev libxslt-dev
sudo apt-get autoremove -yq
gem2.0 install --no-ri --no-rdoc bundler
SHELL

# add the local user git config to the vm
config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"

config.vm.provision "install",
type: "shell",
privileged: false,
inline: <<-SHELL
echo "=============================================="
echo "Installing app dependencies"
cd /vagrant
bundle config build.nokogiri --use-system-libraries
bundle install
SHELL

config.vm.provision "run",
type: "shell",
privileged: false,
run: "always",
inline: <<-SHELL
echo "=============================================="
echo "Starting up middleman at http://localhost:4567"
echo "If it does not come up, check the ~/middleman.log file for any error messages"
cd /vagrant
bundle exec middleman server --watcher-force-polling --watcher_latency=1 &> ~/middleman.log &
SHELL
end
8 changes: 8 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
@@ -18,6 +18,8 @@
# Activate the syntax highlighter
activate :syntax

activate :sprockets

activate :autoprefixer do |config|
config.browsers = ['last 2 version', 'Firefox ESR']
config.cascade = false
@@ -30,9 +32,15 @@

# Build Configuration
configure :build do
# If you're having trouble with Middleman hanging, commenting
# out the following two lines has been known to help
activate :minify_css
activate :minify_javascript
# activate :relative_assets
# activate :asset_hash
# activate :gzip
end

# Deploy Configuration
# If you want Middleman to listen on a different port, you can set that below
set :port, 4567
203 changes: 203 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
#!/usr/bin/env bash
set -o errexit #abort if any command fails
me=$(basename "$0")

help_message="\
Usage: $me [-c FILE] [<options>]
Deploy generated files to a git branch.
Options:
-h, --help Show this help information.
-v, --verbose Increase verbosity. Useful for debugging.
-e, --allow-empty Allow deployment of an empty directory.
-m, --message MESSAGE Specify the message used when committing on the
deploy branch.
-n, --no-hash Don't append the source commit's hash to the deploy
commit's message.
"

bundle exec middleman build --clean

parse_args() {
# Set args from a local environment file.
if [ -e ".env" ]; then
source .env
fi

# Parse arg flags
# If something is exposed as an environment variable, set/overwrite it
# here. Otherwise, set/overwrite the internal variable instead.
while : ; do
if [[ $1 = "-h" || $1 = "--help" ]]; then
echo "$help_message"
return 0
elif [[ $1 = "-v" || $1 = "--verbose" ]]; then
verbose=true
shift
elif [[ $1 = "-e" || $1 = "--allow-empty" ]]; then
allow_empty=true
shift
elif [[ ( $1 = "-m" || $1 = "--message" ) && -n $2 ]]; then
commit_message=$2
shift 2
elif [[ $1 = "-n" || $1 = "--no-hash" ]]; then
GIT_DEPLOY_APPEND_HASH=false
shift
else
break
fi
done

# Set internal option vars from the environment and arg flags. All internal
# vars should be declared here, with sane defaults if applicable.

# Source directory & target branch.
deploy_directory=build
deploy_branch=gh-pages

#if no user identity is already set in the current git environment, use this:
default_username=${GIT_DEPLOY_USERNAME:-deploy.sh}
default_email=${GIT_DEPLOY_EMAIL:-}

#repository to deploy to. must be readable and writable.
repo=origin

#append commit hash to the end of message by default
append_hash=${GIT_DEPLOY_APPEND_HASH:-true}
}

main() {
parse_args "$@"

enable_expanded_output

if ! git diff --exit-code --quiet --cached; then
echo Aborting due to uncommitted changes in the index >&2
return 1
fi

commit_title=`git log -n 1 --format="%s" HEAD`
commit_hash=` git log -n 1 --format="%H" HEAD`

#default commit message uses last title if a custom one is not supplied
if [[ -z $commit_message ]]; then
commit_message="publish: $commit_title"
fi

#append hash to commit message unless no hash flag was found
if [ $append_hash = true ]; then
commit_message="$commit_message"$'\n\n'"generated from commit $commit_hash"
fi

previous_branch=`git rev-parse --abbrev-ref HEAD`

if [ ! -d "$deploy_directory" ]; then
echo "Deploy directory '$deploy_directory' does not exist. Aborting." >&2
return 1
fi

# must use short form of flag in ls for compatibility with OS X and BSD
if [[ -z `ls -A "$deploy_directory" 2> /dev/null` && -z $allow_empty ]]; then
echo "Deploy directory '$deploy_directory' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag." >&2
return 1
fi

if git ls-remote --exit-code $repo "refs/heads/$deploy_branch" ; then
# deploy_branch exists in $repo; make sure we have the latest version

disable_expanded_output
git fetch --force $repo $deploy_branch:$deploy_branch
enable_expanded_output
fi

# check if deploy_branch exists locally
if git show-ref --verify --quiet "refs/heads/$deploy_branch"
then incremental_deploy
else initial_deploy
fi

restore_head
}

initial_deploy() {
git --work-tree "$deploy_directory" checkout --orphan $deploy_branch
git --work-tree "$deploy_directory" add --all
commit+push
}

incremental_deploy() {
#make deploy_branch the current branch
git symbolic-ref HEAD refs/heads/$deploy_branch
#put the previously committed contents of deploy_branch into the index
git --work-tree "$deploy_directory" reset --mixed --quiet
git --work-tree "$deploy_directory" add --all

set +o errexit
diff=$(git --work-tree "$deploy_directory" diff --exit-code --quiet HEAD --)$?
set -o errexit
case $diff in
0) echo No changes to files in $deploy_directory. Skipping commit.;;
1) commit+push;;
*)
echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2
return $diff
;;
esac
}

commit+push() {
set_user_id
git --work-tree "$deploy_directory" commit -m "$commit_message"

disable_expanded_output
#--quiet is important here to avoid outputting the repo URL, which may contain a secret token
git push --quiet $repo $deploy_branch
enable_expanded_output
}

#echo expanded commands as they are executed (for debugging)
enable_expanded_output() {
if [ $verbose ]; then
set -o xtrace
set +o verbose
fi
}

#this is used to avoid outputting the repo URL, which may contain a secret token
disable_expanded_output() {
if [ $verbose ]; then
set +o xtrace
set -o verbose
fi
}

set_user_id() {
if [[ -z `git config user.name` ]]; then
git config user.name "$default_username"
fi
if [[ -z `git config user.email` ]]; then
git config user.email "$default_email"
fi
}

restore_head() {
if [[ $previous_branch = "HEAD" ]]; then
#we weren't on any branch before, so just set HEAD back to the commit it was on
git update-ref --no-deref HEAD $commit_hash $deploy_branch
else
git symbolic-ref HEAD refs/heads/$previous_branch
fi

git reset --mixed
}

filter() {
sed -e "s|$repo|\$repo|g"
}

sanitize() {
"$@" 2> >(filter 1>&2) | filter
}

[[ $1 = --source-only ]] || main "$@"
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '2'
services:
slate:
container_name: 'dbljump_api_docs'
image: crazw/slate
volumes:
- ./source:/app/source
ports:
- '4567:4567'
Binary file modified source/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions source/includes/_errors.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Errors

<aside class="notice">This error section is stored in a separate file in `includes/_errors.md`. Slate allows you to optionally separate out your docs into many files...just save them to the `includes` folder and add them to the top of your `index.md`'s frontmatter. Files are included in the order listed.</aside>
General errors not specific to one part of the application.

The Kittn API uses the following error codes:
### Authorization errors

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
401 | USER_ACTIVATION_REQUIRED | n/a | User not yet activated.
401 | USER_CREDENTIALS_INVALID | n/a | Invalid email and password combination.
401 | USER_LOGIN_EXPIRED | n/a | The JWT in the header has expired.
401 | USER_LOGIN_TOKEN_INVALID | n/a/ | User login token invalid.
401 | USER_UNAUTHORIZED | n/a | User not authorized.

Error Code | Meaning
---------- | -------
400 | Bad Request -- Your request sucks
401 | Unauthorized -- Your API key is wrong
403 | Forbidden -- The kitten requested is hidden for administrators only
404 | Not Found -- The specified kitten could not be found
405 | Method Not Allowed -- You tried to access a kitten with an invalid method
406 | Not Acceptable -- You requested a format that isn't json
410 | Gone -- The kitten requested has been removed from our servers
418 | I'm a teapot
429 | Too Many Requests -- You're requesting too many kittens! Slow down!
500 | Internal Server Error -- We had a problem with our server. Try again later.
503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later.
### GET errors

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | CANNOT_SEARCH | 400 | Search is not supported for this type of record.
404 | RECORD_NOT_FOUND | n/a | Record not found.
195 changes: 195 additions & 0 deletions source/includes/articles/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
## Get all articles

> Response body | `HTTP 200`
```JSON
# GET /articles?articles?page[size]=2&sort=-status&filter[type]=game

{
"data": [
{
"id": "95",
"type": "games",
"attributes": {
"display_title": "Shadow of the Beast",
"sort_title": "Shadow of the Beast",
"slug": "shadow-of-the-beast",
"description": "Shadow of the Beast is 1989 fantasy platform game developed by Reflections and published by Psygnosis.",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": "2017-08-15T09:33:50.976Z",
"status": "published"
},
"relationships": {
"primary_image": {
"data": {
"id": "87",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/shadow-of-the-beast-amiga-screenshot"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
}
},
"meta": {
"description": "Find Shadow of the Beast trivia, screenshots, credits and other info at Dbljump, the video game reference.",
"keywords": "Shadow of the Beast, 1989, Amiga, Atari ST, Commodore 64, Amstrad CPC, ZX Spectrum, Genesis, Master System, Lynx, FM Towns, TurboGrafx-CD, game, credits, screenshots, trivia, dbljump, video games, pc games, gaming",
"created_at": "2017-08-15T09:33:50.982Z",
"updated_at": "2017-08-15T09:34:27.992Z"
}
},
{
"id": "94",
"type": "games",
"attributes": {
"display_title": "North & South",
"sort_title": "North & South",
"slug": "north-south",
"description": "North & South is a 1989 American Civil War-themed strategy game developed by Infogrames.",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": "2017-08-15T09:33:50.928Z",
"status": "published"
},
"relationships": {
"primary_image": {
"data": {
"id": "86",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/north-south-atari-st-screenshot"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
}
},
"meta": {
"description": "Find North & South trivia, screenshots, credits and other info at Dbljump, the video game reference.",
"keywords": "North & South, 1989, Amiga, Atari ST, Commodore 64, MS-DOS, MSX, Nintendo Entertainment System, ZX Spectrum, Amstrad CPC, Nord et Sud, game, credits, screenshots, trivia, dbljump, video games, pc games, gaming",
"created_at": "2017-08-15T09:33:50.934Z",
"updated_at": "2017-08-15T09:34:27.462Z"
}
}
],
"included": [
{
"id": "87",
"type": "images",
"attributes": {
"original": "http://localhost:3000/uploads/images/87/shadow-of-the-beast-amiga-screenshot-1708151034.jpg",
"thumb": "http://localhost:3000/uploads/images/87/th_shadow-of-the-beast-amiga-screenshot-1708151034.jpg",
"title": "Shadow of the Beast Amiga screenshot"
},
"links": {
"self": "http://localhost:3000/media/images/shadow-of-the-beast-amiga-screenshot"
},
"meta": {
"description": "'Shadow of the Beast Amiga screenshot' is a video game image at Dbljump.",
"keywords": "Shadow of the Beast Amiga screenshot, screen, Psygnosis Limited, image, picture, media, dbljump, video games, pc games, gaming",
"created_at": "2017-08-15T09:34:27.853Z",
"updated_at": "2017-08-15T09:34:27.853Z"
}
},
{
"id": "1",
"type": "users",
"attributes": {
"username": "tikithekiwi",
"avatar_thumb": "http://localhost:3000/uploads/user_avatar/1/th_tikithekiwi-1708151031.jpg"
},
"links": {
"self": "http://localhost:3000/users/1"
},
"meta": {
"description": "Tiki the Kiwi is a member at Dbljump, the video game reference.",
"keywords": "tikithekiwi, Tiki the Kiwi, user, dbljump, video games, pc games, gaming",
"last_signed_in_at": null,
"last_sign_in_ip": null,
"sign_in_count": 0,
"activated_at": "2017-08-15T09:31:43.431Z",
"created_at": "2017-08-15T09:31:45.327Z",
"updated_at": "2017-08-15T09:31:45.327Z"
}
},
{
"id": "86",
"type": "images",
"attributes": {
"original": "http://localhost:3000/uploads/images/86/north-south-atari-st-screenshot-1708151034.gif",
"thumb": "http://localhost:3000/uploads/images/86/th_north-south-atari-st-screenshot-1708151034.gif",
"title": "North & South Atari ST screenshot"
},
"links": {
"self": "http://localhost:3000/media/images/north-south-atari-st-screenshot"
},
"meta": {
"description": "'North & South Atari ST screenshot' is a video game image at Dbljump.",
"keywords": "North & South Atari ST screenshot, screen, Infogrames, image, picture, media, dbljump, video games, pc games, gaming",
"created_at": "2017-08-15T09:34:27.293Z",
"updated_at": "2017-08-15T09:34:27.293Z"
}
}
],
"links": {
"self": "http://localhost:3000/articles?filter%5Btype%5D=game&page%5Bnumber%5D=1&page%5Bsize%5D=2&sort=-id",
"next": "http://localhost:3000/articles?filter%5Btype%5D=game&page%5Bnumber%5D=2&page%5Bsize%5D=2&sort=-id",
"last": "http://localhost:3000/articles?filter%5Btype%5D=game&page%5Bnumber%5D=10&page%5Bsize%5D=2&sort=-id"
},
"meta": {
"total_items": 19
}
}
```

Retrieve a collection of articles.

### HTTP request

`GET /articles`

### URL queries

* See the ['Using URL queries' section](#using-url-queries) for more information and a table of sort query fields.

Filter field | Acceptable values
------------ | -----------------
type | `game`, `company`, `person`
status | `draft`, `submitted`, `published_at`
origin_date | `1800-01-01` or later
origin_year | `1800` or later
ended | `true` or `false`
end_date | `1800-01-01` or later
end_year | `1800` or later
created_by_id | Valid user ID
last_review_outcome | `ok`, `fail_style`, `fail_incomplete`, `fail_accuracy`

### Success HTTP response code

`200 OK`
26 changes: 26 additions & 0 deletions source/includes/articles/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# <a name="articles_intro"></a>Articles

Use this feature to get mixed collections of game, company and people articles.

### Default response attributes

Attribute | Description
--------- | -----------
display_title (str) | The main article title
sort_title (str) | Removes 'The' for company and game names; puts family name first for people
slug (str) | Unique parameterized display_title used for friendly URLs
description (str) | Article summary text
last_submitted_at (time) | Date and time last submitted for peer review
last_reviewed_at (time) | Date and time last peer reviewed
last_review_outcome (str) | Outcome of last peer review
last_review_comments (str) | Comments from last peer review
published_at (time) | Date and time published
status (str) | Publishing status

### Relationships

Relationship | JSON API type
------------ | -------------
primary_images | images
created_by | users
last_reviewed_by | users
239 changes: 239 additions & 0 deletions source/includes/articles/companies/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
## <a name="comanies_create"></a>Create a new company

> Request body | `POST /articles/companies`
```JSON
{
"data": {
"type": "companies",
"attributes": {
"display_title": "New Firm",
"description": "New Firm is a new company, and this describes it.",
"origin_date": "1965-09-12",
"origin_year": "",
"end": "",
"end_date": "2012-05-18",
"end_year": ""
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
}
},
"origin_place": {
"data": {
"id": "2883",
"type": "places"
}
},
"latest_place": {
"data": {
"id": "2932",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "49",
"type": "companies",
"attributes": {
"display_title": "New Firm",
"description": "New Firm is a new company, and this describes it.",
"slug": "new-firm",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": null,
"status": "draft",
"origin_date": "1965-09-12",
"origin_year": 1965,
"end": true,
"end_date": "2012-05-18",
"end_year": 2012
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
"created_by": {
"data": {
"id": "2",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/2"
}
},
"last_reviewed_by": {
"data": null
},
"origin_place": {
"data": {
"id": "2883",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/los-angeles-california-united-states"
}
},
"latest_place": {
"data": {
"id": "2932",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/kyoto-kyoto-prefecture-japan"
}
},
"names": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/new-firm/names"
}
},
"notes": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/new-firm/notes"
}
},
"images": {
"data": [
{
"id": "1",
"type": "images"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/new-firm/images"
}
},
"credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/new-firm/credits"
}
},
"parents": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/new-firm/parents"
}
},
"children": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/new-firm/children"
}
}
},
"links": {
"self": "http://localhost:3000/articles/companies/new-firm"
}
},
"included": [
{
"id": "1",
"type": "images",
"attributes": {
"file": "http://localhost:3000/uploads/images/1/nintendo-hq-kyoto-2006.jpg",
"title": "Nintendo office"
},
"links": {
"self": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
{
"id": "2",
"type": "users",
"attributes": {
"username": "neil",
"avatar": "http://localhost:3000/uploads/user_avatar/2/1706221451.jpg"
},
"links": {
"self": "http://localhost:3000/users/2"
}
},
{
"id": "2883",
"type": "places",
"attributes": {
"name": "Los Angeles",
"formatted": "Los Angeles, California, United States"
},
"links": {
"self": "http://localhost:3000/places/los-angeles-california-united-states"
}
},
{
"id": "2932",
"type": "places",
"attributes": {
"name": "Kyoto",
"formatted": "Kyoto, Kyoto Prefecture, Japan"
},
"links": {
"self": "http://localhost:3000/places/kyoto-kyoto-prefecture-japan"
}
}
],
"meta": {
"keywords": "New Firm, 1965, Los Angeles, California, United States, Kyoto, Kyoto Prefecture, Japan, company, profile, biography, trivia, dbljump, video games, pc games, gaming",
"description": "Find New Firm's game credits, profile, images and facts at Dbljump, the video game reference.",
"created_at": "2017-06-27T22:28:07.651Z",
"updated_at": "2017-06-27T22:28:07.651Z"
}
}
```

Create a new company article. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/companies`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
display_title | string | Y | 1-250 characters.
description | text | | 1-800 characters.
origin_date | date | | Between 1st Jan 1800 and the present.
origin_year | integer | | Between 1800 and the present year.
end | boolean | | True if the company has end.
end_date | date | | Between 1st Jan 1800 and the present.
end_year | integer | | Between 1800 and the present year.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
origin_place | belongs_to | | places | Can be a country, subdivision, or locality.
latest_place | belongs_to | | places | Can be a country, subdivision, or locality.
primary_image | belongs_to | | images | The main article image, usually the company logo.

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/companies/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="companies_delete"></a>Delete a company

Delete an existing company article. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/companies/{slug}` (replace `{slug}` with record slug)

### Success HTTP response code

`204 No Content`
15 changes: 15 additions & 0 deletions source/includes/articles/companies/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## <a name="companies_errors"></a>Errors

Errors specific to creating and updating company articles.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | COMPANY_DISPLAY_TITLE_BLANK | display_title | Display title is required.
400 | COMPANY_DISPLAY_TITLE_TOO_LONG | display_title | Display title cannot be more than 250 characters.
400 | COMPANY_DESCRIPTION_TOO_LONG | description | Description cannot be more than 800 characters.
400 | COMPANY_ORIGIN_DATE_INCLUSION | origin_date | Founded date must be a past date not before 1800.
400 | COMPANY_ORIGIN_YEAR_INCLUSION | origin_year | Founded year must be a past year not before 1800.
400 | COMPANY_END_DATE_INCLUSION | end_date | Closed date must be a past date not before 1800.
400 | COMPANY_END_DATE_INVALID | end_date | Closed date must not be eariler than founded date.
400 | COMPANY_END_YEAR_INCLUSION | end_year | Closed year must be a past year not before 1800.
400 | COMPANY_END_YEAR_INVALID | end_year | Closed year must not be eariler than founded year.
336 changes: 336 additions & 0 deletions source/includes/articles/companies/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,336 @@
## Get all companies

> Response body | `HTTP 200`
```JSON
# GET /articles/companies?page[size]=2

{
"data": [
{
"id": "1",
"type": "companies",
"attributes": {
"display_title": "Amstrad",
"sort_title": "Amstrad",
"slug": "amstrad",
"description": "Amstrad is a British electronics company best known within gaming as creator of the Amstrad 464 and CPC home computers of the 1980s.",
"last_review_outcome": null,
"last_review_comments": null,
"origin_date": null,
"origin_year": 1968,
"ended": null,
"end_date": null,
"end_year": null
},
"relationships": {
"primary_image": {
"data": null,
"links": {
"related": "http://localhost:3000/media/images/23"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
},
"origin_place": {
"data": {
"id": "1031",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/1031"
}
},
"latest_place": {
"data": null,
"links": {
"related": "http://localhost:3000/places/2937"
}
},
"names": {
"data": [
{
"id": "1",
"type": "company_names"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/1/names"
},
"meta": {
"total": 1
}
},
"notes": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/1/notes"
},
"meta": {
"total": 0
}
},
"images": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/1/images"
},
"meta": {
"total": 0
}
},
"credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/1/credits"
},
"meta": {
"total": 0
}
},
"parents": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/1/parents"
},
"meta": {
"total": 0
}
},
"children": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/1/children"
},
"meta": {
"total": 0
}
},
"platforms": {
"data": [
{
"id": "1",
"type": "platforms"
},
{
"id": "2",
"type": "platforms"
}
],
"links": {
"related": "http://localhost:3000/platforms?filter%5Bholder_id%5D=1"
},
"meta": {
"total": 2
}
}
},
"links": {
"self": "http://localhost:3000/articles/companies/1"
},
"meta": {
"created_at": "2017-08-25T08:32:15.415Z",
"updated_at": "2017-08-25T08:32:15.415Z",
"meta_description": "Find Amstrad's game credits, profile, images and facts at Dbljump, the video game reference.",
"meta_keywords": "Amstrad, 1968, London, United Kingdom, company, profile, biography, trivia, dbljump, video games, pc games, gaming",
"status": "published",
"last_submitted_at": null,
"last_reviewed_at": null,
"published_at": "2017-08-25T08:32:15.329Z",
"total_names": 1,
"total_notes": 0,
"total_images": 0,
"total_credits": 0,
"total_parents": 0,
"total_children": 0
}
},
{
"id": "2",
"type": "companies",
"attributes": {
"display_title": "Sinclair Research Ltd",
"sort_title": "Sinclair Research Ltd",
"slug": "sinclair-research-ltd",
"description": "Sinclair Research is a British electronics company best known within gaming as creator of the ZX Spectrum series of home computers.",
"last_review_outcome": null,
"last_review_comments": null,
"origin_date": null,
"origin_year": 1973,
"ended": null,
"end_date": null,
"end_year": null
},
"relationships": {
"primary_image": {
"data": null,
"links": {
"related": "http://localhost:3000/media/images/23"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
},
"origin_place": {
"data": {
"id": "2925",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/2925"
}
},
"latest_place": {
"data": {
"id": "1031",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/1031"
}
},
"names": {
"data": [
{
"id": "2",
"type": "company_names"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/2/names"
},
"meta": {
"total": 1
}
},
"notes": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/2/notes"
},
"meta": {
"total": 0
}
},
"images": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/2/images"
},
"meta": {
"total": 0
}
},
"credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/2/credits"
},
"meta": {
"total": 0
}
},
"parents": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/2/parents"
},
"meta": {
"total": 0
}
},
"children": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/2/children"
},
"meta": {
"total": 0
}
},
"platforms": {
"data": [
{
"id": "3",
"type": "platforms"
}
],
"links": {
"related": "http://localhost:3000/platforms?filter%5Bholder_id%5D=2"
},
"meta": {
"total": 1
}
}
},
"links": {
"self": "http://localhost:3000/articles/companies/2"
},
"meta": {
"created_at": "2017-08-25T08:32:15.514Z",
"updated_at": "2017-08-25T08:32:15.514Z",
"meta_description": "Find Sinclair Research Ltd's game credits, profile, images and facts at Dbljump, the video game reference.",
"meta_keywords": "Sinclair Research Ltd, 1973, Cambridge, East of England, United Kingdom, London, United Kingdom, company, profile, biography, trivia, dbljump, video games, pc games, gaming",
"status": "published",
"last_submitted_at": null,
"last_reviewed_at": null,
"published_at": "2017-08-25T08:32:15.460Z",
"total_names": 1,
"total_notes": 0,
"total_images": 0,
"total_credits": 0,
"total_parents": 0,
"total_children": 0
}
}
],
"links": {
"self": "http://localhost:3000/articles/companies?page%5Bnumber%5D=1&page%5Bsize%5D=2",
"next": "http://localhost:3000/articles/companies?page%5Bnumber%5D=2&page%5Bsize%5D=2",
"last": "http://localhost:3000/articles/companies?page%5Bnumber%5D=26&page%5Bsize%5D=2"
},
"meta": {
"total_items": 52
}
```

Retrieve all company articles. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/companies`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[companies]=display_title,description`
filter[{field}] | All records | Filter search by field, e.g. `?filter[end]=true`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
11 changes: 11 additions & 0 deletions source/includes/articles/companies/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <a name="companies_intro"></a>Articles: Companies

Resources related to company articles.

### Request attributes

See [Create a new company](#companies_create) and [Update a company](#companies_update).

### Response attributes

See [Get a single company](#companies_show)
334 changes: 334 additions & 0 deletions source/includes/articles/companies/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
## <a name="companies_show"></a>Get a single company

> Response body | `HTTP 200`
```JSON
# GET /articles/companies/nintendo-co-ltd

{
"data": {
"id": "8",
"type": "companies",
"attributes": {
"display_title": "Nintendo Co., Ltd.",
"sort_title": "Nintendo Co., Ltd.",
"slug": "nintendo-co-ltd",
"description": "Nintendo is a Japanese video game hardware and software company founded in 1889.",
"last_review_outcome": null,
"last_review_comments": null,
"origin_date": null,
"origin_year": 1889,
"ended": null,
"end_date": null,
"end_year": null
},
"relationships": {
"primary_image": {
"data": {
"id": "17",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/17"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
},
"origin_place": {
"data": {
"id": "2964",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/2964"
}
},
"latest_place": {
"data": null
},
"names": {
"data": [
{
"id": "8",
"type": "company_names"
},
{
"id": "53",
"type": "company_names"
},
{
"id": "54",
"type": "company_names"
},
{
"id": "55",
"type": "company_names"
},
{
"id": "56",
"type": "company_names"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/8/names"
},
"meta": {
"total": 5
}
},
"notes": {
"data": [
{
"id": "1",
"type": "company_notes"
},
{
"id": "2",
"type": "company_notes"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/8/notes"
},
"meta": {
"total": 2
}
},
"images": {
"data": [
{
"id": "1",
"type": "images"
},
{
"id": "2",
"type": "images"
},
{
"id": "3",
"type": "images"
},
{
"id": "4",
"type": "images"
},
{
"id": "5",
"type": "images"
},
{
"id": "17",
"type": "images"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/8/images"
},
"meta": {
"total": 6
}
},
"credits": {
"data": [
{
"id": "11",
"type": "company_credits"
},
{
"id": "33",
"type": "company_credits"
},
{
"id": "35",
"type": "company_credits"
},
{
"id": "39",
"type": "company_credits"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/8/credits"
},
"meta": {
"total": 4
}
},
"parents": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/8/parents"
},
"meta": {
"total": 0
}
},
"children": {
"data": [
{
"id": "12",
"type": "company_kinships"
},
{
"id": "28",
"type": "company_kinships"
},
{
"id": "29",
"type": "company_kinships"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/8/children"
},
"meta": {
"total": 3
}
},
"platforms": {
"data": [
{
"id": "24",
"type": "platforms"
},
{
"id": "25",
"type": "platforms"
},
{
"id": "26",
"type": "platforms"
},
{
"id": "27",
"type": "platforms"
},
{
"id": "28",
"type": "platforms"
},
{
"id": "29",
"type": "platforms"
},
{
"id": "30",
"type": "platforms"
},
{
"id": "31",
"type": "platforms"
},
{
"id": "32",
"type": "platforms"
},
{
"id": "33",
"type": "platforms"
},
{
"id": "34",
"type": "platforms"
},
{
"id": "35",
"type": "platforms"
},
{
"id": "36",
"type": "platforms"
},
{
"id": "37",
"type": "platforms"
},
{
"id": "38",
"type": "platforms"
},
{
"id": "39",
"type": "platforms"
}
],
"links": {
"related": "http://localhost:3000/platforms?filter%5Bholder_id%5D=8"
},
"meta": {
"total": 16
}
}
},
"links": {
"self": "http://localhost:3000/articles/companies/8"
},
"meta": {
"created_at": "2017-08-25T08:32:15.829Z",
"updated_at": "2017-08-25T08:32:31.459Z",
"meta_description": "Find Nintendo Co., Ltd.'s game credits, profile, images and facts at Dbljump, the video game reference.",
"meta_keywords": "Nintendo Co., Ltd., 1889, Kyoto, Kyoto Prefecture, Japan, Nintendo, 任天堂株式会社, Nintendō Kabushiki gaisha, Nintendo Playing Card Co., Nintendo Koppai, company, profile, biography, trivia, dbljump, video games, pc games, gaming",
"status": "published",
"last_submitted_at": null,
"last_reviewed_at": null,
"published_at": "2017-08-25T08:32:15.798Z",
"total_names": 5,
"total_notes": 2,
"total_images": 6,
"total_credits": 4,
"total_parents": 0,
"total_children": 3
}
}
}
```

Retrieve a single company article. Companies are publicly available. No sign-in is required.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/companies/{slug}` (replace `{slug}` with record slug)

### Success HTTP response code

`200 OK`

### <a name="company_response_attrs"></a>Response attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
display_title | string | Y | The article title, usually the company name.
description | text | | A short biography up to 800 chars.
origin_date | date | | Between 1st Jan 1800 and the present.
origin_year | integer | | Between 1800 and the present year.
end | boolean | | True if the company has end.
end_date | date | | Between 1st Jan 1800 and the present.
end_year | integer | | Between 1800 and the present year.
slug | string | Y | A record ID based on the display_title.

### Relationships

Association | Record type | Relationship type
------------ | ---------- | -----------------
origin_place | places | belongs_to
latest_place | places | belongs_to
created_by | users | belongs_to
primary_image | images | belongs_to
platforms | platforms | has_many

### Meta

The `meta` section of the JSON response includes `keywords`, `description`, `created_at` and `updated_at` attributes.
260 changes: 260 additions & 0 deletions source/includes/articles/companies/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
## <a name="companies_update"></a>Update a company

> Request body | `PATCH /articles/companies/microsoft-corporation`
```JSON
{
"data": {
"type": "companies",
"id": "microsoft-corporation",
"attributes": {
"display_title": "Changed Name",
"description": "Updated description for an updated article.",
"origin_date": "1940-09-12",
"origin_year": "",
"ended": "",
"end_date": "2013-04-05",
"end_year": ""
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
}
},
"origin_place": {
"data": {
"id": "25",
"type": "places"
}
},
"latest_place": {
"data": {
"id": "2933",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "4",
"type": "companies",
"attributes": {
"display_title": "Changed Name",
"description": "Updated description for an updated article.",
"slug": "changed-name",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": "2017-06-28T17:04:18.271Z",
"status": "published",
"origin_date": "1940-09-12",
"origin_year": 1940,
"end": true,
"end_date": "2013-04-05",
"end_year": 2013
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
},
"origin_place": {
"data": {
"id": "25",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/bolivia"
}
},
"latest_place": {
"data": {
"id": "2933",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/sonobe-kyoto-prefecture-japan"
}
},
"names": {
"data": [
{
"id": "12",
"type": "company_names"
},
{
"id": "13",
"type": "company_names"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/changed-name/names"
}
},
"notes": {
"data": [
{
"id": "5",
"type": "company_notes"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/changed-name/notes"
}
},
"images": {
"data": [
{
"id": "1",
"type": "images"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/changed-name/images"
}
},
"credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/changed-name/credits"
}
},
"parents": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/companies/changed-name/parents"
}
},
"children": {
"data": [
{
"id": "17",
"type": "company_kinships"
}
],
"links": {
"related": "http://localhost:3000/articles/companies/changed-name/children"
}
}
},
"links": {
"self": "http://localhost:3000/articles/companies/changed-name"
}
},
"included": [
{
"id": "1",
"type": "images",
"attributes": {
"file": "http://localhost:3000/uploads/images/1/nintendo-hq-kyoto-2006.jpg",
"title": "Nintendo office"
},
"links": {
"self": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
{
"id": "1",
"type": "users",
"attributes": {
"username": "tikithekiwi",
"avatar": null
},
"links": {
"self": "http://localhost:3000/users/1"
}
},
{
"id": "25",
"type": "places",
"attributes": {
"name": "Bolivia",
"formatted": "Bolivia"
},
"links": {
"self": "http://localhost:3000/places/bolivia"
}
},
{
"id": "2933",
"type": "places",
"attributes": {
"name": "Sonobe",
"formatted": "Sonobe, Kyoto Prefecture, Japan"
},
"links": {
"self": "http://localhost:3000/places/sonobe-kyoto-prefecture-japan"
}
}
],
"meta": {
"keywords": "Changed Name, 1940, Bolivia, Sonobe, Kyoto Prefecture, Japan, MS, Microsoft, company, profile, biography, trivia, dbljump, video games, pc games, gaming",
"description": "Find Changed Name's game credits, profile, images and facts at Dbljump, the video game reference.",
"created_at": "2017-06-28T17:04:18.295Z",
"updated_at": "2017-06-28T17:05:53.641Z"
}
}
```

Update an existing company article. The user must be an editor.

* User authentication: required
* Authorization level: admin

### HTTP request

`PATCH /articles/companies/{slug}` (replace `{slug}` with record slug)

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
display_title | string | Y | 1-250 characters.
description | text | | 1-800 characters.
origin_date | date | | Between 1st Jan 1800 and the present.
origin_year | integer | | Between 1800 and the present year.
end | boolean | | True if the company has end.
end_date | date | | Between 1st Jan 1800 and the present.
end_year | integer | | Between 1800 and the present year.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
primary_image | belongs_to | | images | The main article image, usually a company logo.
origin_place | belongs_to | | places | Can be a country, subdivision, or locality.
latest_place | belongs_to | | places | Can be a country, subdivision, or locality.
platforms | has_many | | platforms | Gaming platforms this company holds.

### Success HTTP response code

`200 OK`
111 changes: 111 additions & 0 deletions source/includes/articles/companies/aliases/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
## Create a new company alias

> Request body | `POST /articles/company_aliases`
```JSON
{
"data": {
"type": "company_aliases",
"attributes": {
"display_text": "New Name",
"kind": "name",
"writing_system": "Latin",
"year_adopted": "2010",
"dropped": "",
"year_dropped": "2017"
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
}
},
"place": {
"data": {
"id": "17",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "61",
"type": "company_aliases",
"attributes": {
"display_text": "New Name",
"kind": "name",
"writing_system": "Latin",
"year_adopted": 2010,
"dropped": true,
"year_dropped": 2017
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"place": {
"data": {
"id": "17",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/bangladesh"
}
}
}
},
"included": [
{
"id": "1",
"type": "companies",
"attributes": {
"display_title": "Nintendo Co., Ltd."
},
"links": {
"self": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
{
"id": "17",
"type": "places",
"attributes": {
"name": "Bangladesh",
"formatted": "Bangladesh"
},
"links": {
"self": "http://localhost:3000/places/bangladesh"
}
}
],
"meta": {
"keywords": "new name, nintendo co., ltd., bangladesh, name, title, alias, dbljump, video games, pc games, gaming",
"description": "New Name is an alternate name or title for Nintendo Co., Ltd.. Learn more at Dbljump, the video game reference.",
"created_at": "2017-05-03T10:05:55.948Z",
"updated_at": "2017-05-03T10:05:55.948Z"
}
}
```

Create a new company alias record. User must be an editor or admin.

### HTTP request

`POST /articles/company_aliases`

### Success HTTP response code

`201 Created`
11 changes: 11 additions & 0 deletions source/includes/articles/companies/aliases/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Delete a company alias

Delete an existing company alias. User must be an editor or admin.

### HTTP request

`DELETE /articles/company_aliases/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
17 changes: 17 additions & 0 deletions source/includes/articles/companies/aliases/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Errors

Errors specific to creating and updating company aliases.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | COMPANY_ALIAS_DISPLAY_TEXT_BLANK | name | Name is required.
400 | COMPANY_ALIAS_DISPLAY_TEXT_TOO_LONG | name | Name cannot be more than 250 characters.
400 | COMPANY_ALIAS_DISPLAY_TEXT_TAKEN | name | Name must be unique to its parent company.
400 | COMPANY_ALIAS_KIND_BLANK | kind | Kind is required.
400 | COMPANY_ALIAS_KIND_INCLUSION | kind | Kind must be an accepted value.
400 | COMPANY_ALIAS_WRITING_SYSTEM_BLANK | writing_system | Writing system is required.
400 | COMPANY_ALIAS_WRITING_SYSTEM_INCLUSION | writing_system | Writing system must be an accepted value.
400 | COMPANY_ALIAS_YEAR_ADOPTED_INCLUSION | year_adopted | Year adopted must be a past year not before 1800.
400 | COMPANY_ALIAS_YEAR_DROPPED_INCLUSION | year_dropped | Year dropped must be a past year not before 1800.
400 | COMPANY_ALIAS_YEAR_DROPPED_INVALID | year_dropped | Year dropped must not be earlier than year adopted.
400 | COMPANY_ALIAS_PLACE_ID_INVALID | data/relationships/place/data/id | Place ID must be a valid country or region ID.
84 changes: 84 additions & 0 deletions source/includes/articles/companies/aliases/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
## Get company aliases

> Response body | `HTTP 200`
```JSON
# GET /articles/company_aliases?page[size]=2

{
"data": [
{
"id": "1",
"type": "company_aliases",
"attributes": {
"display_text": "任天堂株式会社",
"kind": "name",
"writing_system": "Japanese",
"year_adopted": null,
"dropped": null,
"year_dropped": null
},
"relationships": {
"place": {
"data": null
}
}
},
{
"id": "2",
"type": "company_aliases",
"attributes": {
"display_text": "Nintendō Kabushiki gaisha",
"kind": "name",
"writing_system": "Latin",
"year_adopted": null,
"dropped": true,
"year_dropped": null
},
"relationships": {
"place": {
"data": null
}
}
}
],
"links": {
"self": "http://localhost:3000/articles/companies/nintendo-co-ltd/names?page%5Bnumber%5D=1&page%5Bsize%5D=2",
"next": "http://localhost:3000/articles/companies/nintendo-co-ltd/names?page%5Bnumber%5D=2&page%5Bsize%5D=2",
"last": "http://localhost:3000/articles/companies/nintendo-co-ltd/names?page%5Bnumber%5D=3&page%5Bsize%5D=2"
},
"meta": {
"total_items": 5
}
}
```

Retrieve a collection of company aliases.

### HTTP request

`GET /articles/company_aliases`

### Filter fields

* `company_id`
* `display_text`
* `kind`
* `writing_system`
* `year_adopted`
* `year_dropped`
* `dropped`

### Sort fields

* `company_id`
* `display_text`
* `kind`
* `writing_system`
* `year_adopted`
* `year_dropped`
* `dropped`

### Success HTTP response code

`200 OK`
36 changes: 36 additions & 0 deletions source/includes/articles/companies/aliases/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Articles: Company Aliases

Resources related to company aliases. An alias is another name the company is known by. The JSON:API type is `company_aliases`.

### Mutable attributes

#### `display_text` (string, required)

The alias. 1-100 chars.

#### `kind` (string, required)

Name classification. Must be `name`, `styled` or `AKA`.

#### `writing_system` (string, required)

Must be `Latin`, `Japanese`, `Cyrillic`, `Chinese` or `Arabic`.

#### `year_adopted` (integer)

Must be between `1800` and the present year.

#### `dropped` (boolean)

`true` if the alias is no longer used. Auto-set to `true` if `year_dropped` is present.

#### `year_dropped` (integer)

Must be between `1800` and the present year, and greater than `year_adopted`.

### Relationships

Name | JSON:API type | Relationship type
------------ | ---------- | -----------------
`place` | `places` | `belongs_to`
`company` | `companies` | `belongs_to`
64 changes: 64 additions & 0 deletions source/includes/articles/companies/aliases/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## Get a single company alias

> Response body | `HTTP 200`
```JSON
# GET /articles/company_names/5

{
"data": {
"id": "5",
"type": "company_names",
"attributes": {
"name": "Nintendo",
"kind": "styled",
"writing_system": "Latin",
"year_adopted": null,
"dropped": null,
"year_dropped": null
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"place": {
"data": null
}
}
},
"included": [
{
"id": "1",
"type": "companies",
"attributes": {
"display_title": "Nintendo Co., Ltd."
},
"links": {
"self": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
}
],
"meta": {
"keywords": "nintendo, nintendo co., ltd., name, title, alias, dbljump, video games, pc games, gaming",
"description": "Nintendo is an alternate name or title for Nintendo Co., Ltd.. Learn more at Dbljump, the video game reference.",
"created_at": "2017-04-24T09:09:13.793Z",
"updated_at": "2017-04-24T09:09:13.793Z"
}
}
```

Retrieve a single company name.

### HTTP request

`GET /articles/company_names/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`
107 changes: 107 additions & 0 deletions source/includes/articles/companies/aliases/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## Update a company alias

> Request body | `PATCH /articles/company_aliases/7`
```JSON
{
"data": {
"type": "company_aliases",
"id": "7",
"attributes": {
"display_text": "アップデート",
"kind": "styled",
"writing_system": "Japanese",
"year_adopted": "1995",
"dropped": "true",
"year_dropped": ""
},
"relationships": {
"place": {
"data": {
"id": "102",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "7",
"type": "company_aliases",
"attributes": {
"display_text": "アップデート",
"kind": "styled",
"writing_system": "Japanese",
"year_adopted": 1995,
"dropped": true,
"year_dropped": null
},
"relationships": {
"company": {
"data": {
"id": "2",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/sega-games-co-ltd"
}
},
"place": {
"data": {
"id": "102",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/japan"
}
}
}
},
"included": [
{
"id": "2",
"type": "companies",
"attributes": {
"display_title": "Sega Games Co., Ltd."
},
"links": {
"self": "http://localhost:3000/articles/companies/sega-games-co-ltd"
}
},
{
"id": "102",
"type": "places",
"attributes": {
"name": "Japan"
},
"links": {
"self": "http://localhost:3000/places/japan"
}
}
],
"meta": {
"keywords": "アップデート, sega games co., ltd., japan, name, title, alias, dbljump, video games, pc games, gaming",
"description": "アップデート is an alternate name or title for Sega Games Co., Ltd.. Learn more at Dbljump, the video game reference.",
"created_at": "2017-04-24T09:09:13.815Z",
"updated_at": "2017-05-03T10:28:40.939Z"
}
}
```

Update an existing company alias. The user must be an editor or admin.

The `company` relationship cannot be updated.

### HTTP request

`PATCH /articles/company_aliases/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`
160 changes: 160 additions & 0 deletions source/includes/articles/companies/credits/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
## <a name="company_credits_create"></a>Create a new company credit

> Request body | `POST /articles/company_credits`
```JSON
{
"data": {
"type": "company_credits",
"attributes": {
"category": "development",
"role": "Developer"
},
"relationships": {
"credited": {
"data": {
"id": "1",
"type": "games"
}
},
"game": {
"data": {
"id": "46",
"type": "games"
}
},
"version": {
"data": {
"id": "1",
"type": "game_versions"
}
},
"place": {
"data": {
"id": "",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "4",
"type": "company_credits",
"attributes": {
"category": "development",
"role": "Developer"
},
"relationships": {
"credited": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": null
}
}
},
"included": [
{
"id": "1",
"type": "companies",
"attributes": {
"display_title": "Nintendo Co., Ltd."
},
"links": {
"self": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
{
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101"
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
}
],
"meta": {
"keywords": "The Wonderful 101, Nintendo Co., Ltd., Developer, company, credit, dbljump, video games, pc games, gaming",
"description": "Find staff and company credits for The Wonderful 101 at Dbljump, the video game reference.",
"created_at": "2017-06-30T23:44:17.051Z",
"updated_at": "2017-06-30T23:44:17.051Z"
}
}
```

Create a new game credit for a given company. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/company_credits`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | The credit category. Must be an accepted value.
role | string | Y | The credit, e.g. 'Publisher' or 'Developr'. Max 100 chars.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
credited | belongs_to | Y | companies | The company credited.
game | belongs_to | Y | games | The game the credit relates to.
version | belongs_to | | game_versions | The game version the credit relates to (optional).
place | belongs_to | | places | The place the credit relates to (optional).

### <a name="company_credit_categories"></a>Company credit categories

The following are accepted value for the categories attribute:

* publishing
* development
* technology
* visuals
* sound
* language
* special
* misc

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/companies/credits/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="company_credits_delete"></a>Delete a company credit

Delete an existing company credit. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/company_credits/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
14 changes: 14 additions & 0 deletions source/includes/articles/companies/credits/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="company_credits_errors"></a>Errors

Errors specific to creating and updating company credits.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | COMPANY_CREDIT_CREDITED_ID_BLANK | data/relationships/credited/data/id | Credited is required.
400 | COMPANY_CREDIT_GAME_ID_BLANK | data/relationships/game/data/id | Game is required.
400 | COMPANY_CREDIT_VERSION_ID_INVALID | data/relationships/version/data/id | Version ID must be a version of credit game.
400 | COMPANY_CREDIT_PLACE_ID_INVALID | data/relationships/place/data/id | Place ID must be a valid country or region ID.
400 | COMPANY_CREDIT_ROLE_BLANK | role | Role is required.
400 | COMPANY_CREDIT_ROLE_TOO_LONG | role | Role cannot be more than 100 characters.
400 | COMPANY_CREDIT_CATEGORY_BLANK | category | Category is required.
400 | COMPANY_CREDIT_CATEGORY_INCLUSION | category | Category must be an accepted value.
78 changes: 78 additions & 0 deletions source/includes/articles/companies/credits/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
## Get all company credits

> Response body | `HTTP 200`
```JSON
# GET /articles/company_credits

{
"data": [
{
"id": "3",
"type": "company_credits",
"attributes": {
"category": "publishing",
"role": "Publisher"
},
"relationships": {
"credited": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": null
}
}
}
],
"links": {},
"meta": {
"total_items": 1
}
}
```

Retrieve all company game credits. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/company_credits`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[company_credits]=role`
filter[{field}] | All records | Filter search by field, e.g. `?filter[category]=publishing`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
11 changes: 11 additions & 0 deletions source/includes/articles/companies/credits/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <a name="company_credits_intro"></a>Articles: Company Credits

Resources related to company credits.

### Request attributes

See [Create a new company credit](#company_credits_create) and [Update a company credit](#company_credits_update).

### Response attributes

See [Get a single company note](#company_credits_show)
111 changes: 111 additions & 0 deletions source/includes/articles/companies/credits/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
## <a name="company_credits_show"></a>Get a single company credit

> Response body | `HTTP 200`
```JSON
# GET /articles/company_credits/1

{
"data": {
"id": "4",
"type": "company_credits",
"attributes": {
"category": "development",
"role": "Developer"
},
"relationships": {
"credited": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": null
}
}
},
"included": [
{
"id": "1",
"type": "companies",
"attributes": {
"display_title": "Nintendo Co., Ltd."
},
"links": {
"self": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
{
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101"
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
}
],
"meta": {
"keywords": "The Wonderful 101, Nintendo Co., Ltd., Developer, company, credit, dbljump, video games, pc games, gaming",
"description": "Find staff and company credits for The Wonderful 101 at Dbljump, the video game reference.",
"created_at": "2017-06-30T23:44:17.051Z",
"updated_at": "2017-06-30T23:44:17.051Z"
}
}
```

Retrieve a single company credit. Game credits are publicly available. No sign-in is required.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/company_credits/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`

### <a name="company_credits_response_attrs"></a>Response attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | The credit category.
role | string | Y | The credit, e.g. 'Publisher' or 'Developer'.

### Relationships

Association | Record type | Relationship type
------------ | ---------- | -----------------
credited | companies | belongs_to
game | games | belongs_to
version | game_versions | belongs_to
place | places | belongs_to

### Meta

The `meta` section of the JSON response includes `keywords`, `description`, `created_at` and `updated_at` attributes.
165 changes: 165 additions & 0 deletions source/includes/articles/companies/credits/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
## <a name="company_credits_update"></a>Update a company credit

> Request body | `PATCH /articles/company_credits/3`
```JSON
{
"data": {
"type": "company_credits",
"id": "3",
"attributes": {
"category": "special",
"role": "Special Thanks"
},
"relationships": {
"version": {
"data": {
"id": "1",
"type": "game_versions"
}
},
"place": {
"data": {
"id": "55",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "3",
"type": "company_credits",
"attributes": {
"category": "special",
"role": "Special Thanks"
},
"relationships": {
"credited": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": {
"id": "55",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/czechia"
}
}
}
},
"included": [
{
"id": "1",
"type": "companies",
"attributes": {
"display_title": "Nintendo Co., Ltd."
},
"links": {
"self": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
{
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101"
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
{
"id": "55",
"type": "places",
"attributes": {
"formatted": "Czechia"
},
"links": {
"self": "http://localhost:3000/places/czechia"
}
}
],
"meta": {
"keywords": "The Wonderful 101, Nintendo Co., Ltd., Special Thanks, Czechia, company, credit, dbljump, video games, pc games, gaming",
"description": "Find staff and company credits for The Wonderful 101 at Dbljump, the video game reference.",
"created_at": "2017-06-30T23:23:15.317Z",
"updated_at": "2017-06-30T23:55:47.337Z"
}
}
```

Update an existing company credit. The user must be an editor.

* User authentication: required
* Authorization level: admin

### HTTP request

`PATCH /articles/company_notes/{id}` (replace `{id}` with record ID)

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | The credit category. Must be an accepted value.
role | string | Y | The credit, e.g. 'Publisher' or 'Developer'.

### Relationships

Check this section's code example to see how to update these relationships.

NOTE - The game and credited relationships cannot be updated.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
version | belongs_to | | game_versions | The game version the credit relates to (optional).
place | belongs_to | | places | The place the credit relates to (optional).

### <a name="company_credit_categories"></a>Company credit categories

The following are accepted value for the categories attribute:

* publishing
* development
* technology
* visuals
* sound
* language
* special
* misc

### Success HTTP response code

`200 OK`
124 changes: 124 additions & 0 deletions source/includes/articles/companies/kinships/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
## <a name="company_kinship_create"></a>Create a new company kinship

> Request body | `POST /articles/company_kinships`
```JSON
{
"data": {
"type": "company_kinships",
"attributes": {
"kind": "ownership",
"start_year": "1997",
"end_year": ""
},
"relationships": {
"child": {
"data": {
"id": "11",
"type": "companies"
}
},
"parent": {
"data": {
"id": "7",
"type": "companies"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "7",
"type": "company_kinships",
"attributes": {
"kind": "ownership",
"start_year": 1997,
"end_year": null
},
"relationships": {
"parent": {
"data": {
"id": "7",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/electronic-arts-inc-ea"
}
},
"child": {
"data": {
"id": "11",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/ea-maxis"
}
}
}
},
"included": [
{
"id": "7",
"type": "companies",
"attributes": {
"display_title": "Electronic Arts, Inc. (EA)"
},
"links": {
"self": "http://localhost:3000/articles/companies/electronic-arts-inc-ea"
}
},
{
"id": "11",
"type": "companies",
"attributes": {
"display_title": "EA Maxis"
},
"links": {
"self": "http://localhost:3000/articles/companies/ea-maxis"
}
}
],
"meta": {
"keywords": "Electronic Arts, Inc. (EA), EA Maxis, ownership, company, ownership, parent, division, subsidiary, branch, dbljump, video games, pc games, gaming",
"description": "",
"created_at": "2017-07-01T12:05:57.502Z",
"updated_at": "2017-07-01T12:05:57.502Z"
}
}
```

Create a new company kinship record. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/companies/{company-slug}/children`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
kind | string | Y | The name classification. Must be 'name', 'styled' or 'alias'.
start_year | integer | | Year the kinship was formed. Must be between 1800 and present year.
end_year | integer | | Year the kinship was ended. Must be between 1800 and present year.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
parent | belongs_to | Y | companies | The parent company.
child | belongs_to | Y | companies | The child company.

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/companies/kinships/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="company_kinships_delete"></a>Delete a company kinship

Delete an existing company kinship. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/company_kinships/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
14 changes: 14 additions & 0 deletions source/includes/articles/companies/kinships/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="company_kinships_errors"></a>Errors

Errors specific to creating and updating company kinships.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | COMPANY_KINSHIP_KIND_BLANK | kind | Kind is required.
400 | COMPANY_KINSHIP_KIND_INCLUSION | kind | Kind must be an accepted value.
400 | COMPANY_KINSHIP_START_YEAR_INCLUSION | start_year | Start year must be a past year not before 1800.
400 | COMPANY_KINSHIP_END_YEAR_INCLUSION | end_year | End year must be a past year not before 1800.
400 | COMPANY_KINSHIP_END_YEAR_INVALID | end_year | End year must not be earlier than start year.
400 | COMPANY_KINSHIP_PARENT_ID_BLANK | data/relationships/parent/data/id | Parent is required.
400 | COMPANY_KINSHIP_CHILD_ID_BLANK | data/relationships/child/data/id | Child is required.
400 | COMPANY_KINSHIP_PARENT_ID_INCLUSION | data/relationships/parent/data/id | Parent ID must not be the same as child ID.
125 changes: 125 additions & 0 deletions source/includes/articles/companies/kinships/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
## Get all company kinships

> Response body | `HTTP 200`
```JSON
# GET /articles/company_kinships

{
"data": [
{
"id": "1",
"type": "company_kinships",
"attributes": {
"kind": "division",
"start_year": null,
"end_year": null
},
"relationships": {
"parent": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"child": {
"data": {
"id": "5",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-entertainment-analysis-development"
}
}
}
},
{
"id": "2",
"type": "company_kinships",
"attributes": {
"kind": "division",
"start_year": null,
"end_year": null
},
"relationships": {
"parent": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"child": {
"data": {
"id": "22",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/retro-studios-inc"
}
}
}
},
{
"id": "3",
"type": "company_kinships",
"attributes": {
"kind": "ownership",
"start_year": null,
"end_year": null
},
"relationships": {
"parent": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"child": {
"data": {
"id": "21",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/monolith-soft-inc"
}
}
}
}
],
"links": {},
"meta": {
"total_items": 3
}
}
```

Retrieve all company kinships. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/company_kinships`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[company_kinships]=kind`
filter[{field}] | All records | Filter search by field, e.g. `?filter[kind]=division`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
5 changes: 5 additions & 0 deletions source/includes/articles/companies/kinships/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# <a name="company_kinships_intro"></a>Articles: Company Kinships

Kinships are relationships between companies, e.g. ownership or division. Each kinship is between two companies, the parent and the child.

These resources include separate routes for indexing and creating parent kinships (`/articles/companies/{company-id}/parents`) and child kinships (`/articles/companies/{company-id}/children`) for a given company. A single common route is used for showing, updating, and deleting existing kinship records (`/articles/company_kinships/{id}`).
99 changes: 99 additions & 0 deletions source/includes/articles/companies/kinships/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
## <a name="company_kinships_show"></a>Get a single company kinship

> Response body | `HTTP 200`
```JSON
# GET /articles/company_kinships/5

{
"data": {
"id": "5",
"type": "company_kinships",
"attributes": {
"kind": "ownership",
"start_year": null,
"end_year": null
},
"relationships": {
"parent": {
"data": {
"id": "4",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/microsoft-corporation"
}
},
"child": {
"data": {
"id": "17",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/mojang-ab"
}
}
}
},
"included": [
{
"id": "4",
"type": "companies",
"attributes": {
"display_title": "Microsoft Corporation"
},
"links": {
"self": "http://localhost:3000/articles/companies/microsoft-corporation"
}
},
{
"id": "17",
"type": "companies",
"attributes": {
"display_title": "Mojang AB"
},
"links": {
"self": "http://localhost:3000/articles/companies/mojang-ab"
}
}
],
"meta": {
"keywords": "Microsoft Corporation, Mojang AB, ownership, company, ownership, parent, division, subsidiary, branch, dbljump, video games, pc games, gaming",
"description": "",
"created_at": "2017-07-01T11:26:52.623Z",
"updated_at": "2017-07-01T11:26:52.623Z"
}
}
```

Retrieve a single company kinship record. Company kinships are publicly available. No sign-in is required.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/company_kinships/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`

### <a name="company_kinships_response_attrs"></a>Response attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
kind | string | Y | The kinship classification. Must be 'ownership' or 'division'.
start_year | integer | | Year the kinship was formed. Must be between 1800 and present year.
end_year | integer | | Year the kinship was ended. Must be between 1800 and present year.

### Relationships

Association | Record type | Relationship type
------------ | ---------- | -----------------
parent | companies | belongs_to
child | companies | belongs_to

### Meta

The `meta` section of the JSON response includes `keywords`, `description`, `created_at` and `updated_at` attributes.
125 changes: 125 additions & 0 deletions source/includes/articles/companies/kinships/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
## <a name="company_kinships_update"></a>Update a company kinship

> Request body | `PATCH /articles/company_kinships/7`
```JSON
{
"data": {
"type": "company_kinships",
"id": "7",
"attributes": {
"kind": "ownership",
"start_year": "1997",
"end_year": "2017"
},
"relationships": {
"child": {
"data": {
"id": "11",
"type": "companies"
}
},
"parent": {
"data": {
"id": "7",
"type": "companies"
}
}
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "7",
"type": "company_kinships",
"attributes": {
"kind": "ownership",
"start_year": 1997,
"end_year": 2017
},
"relationships": {
"parent": {
"data": {
"id": "7",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/electronic-arts-inc-ea"
}
},
"child": {
"data": {
"id": "11",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/ea-maxis"
}
}
}
},
"included": [
{
"id": "7",
"type": "companies",
"attributes": {
"display_title": "Electronic Arts, Inc. (EA)"
},
"links": {
"self": "http://localhost:3000/articles/companies/electronic-arts-inc-ea"
}
},
{
"id": "11",
"type": "companies",
"attributes": {
"display_title": "EA Maxis"
},
"links": {
"self": "http://localhost:3000/articles/companies/ea-maxis"
}
}
],
"meta": {
"keywords": "Electronic Arts, Inc. (EA), EA Maxis, ownership, company, ownership, parent, division, subsidiary, branch, dbljump, video games, pc games, gaming",
"description": "",
"created_at": "2017-07-01T12:05:57.502Z",
"updated_at": "2017-07-01T12:10:00.459Z"
}
}
```

Update an existing company kinship. The user must be an editor.

* User authentication: required
* Authorization level: admin

### HTTP request

`PATCH /articles/company_kinships/{id}` (replace `{id}` with record ID)

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
kind | string | Y | The name classification. Must be 'name', 'styled' or 'alias'.
start_year | integer | | Year the kinship was formed. Must be between 1800 and present year.
end_year | integer | | Year the kinship was ended. Must be between 1800 and present year.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
parent | belongs_to | Y | companies | The parent company.
child | belongs_to | Y | companies | The child company.

### Success HTTP response code

`200 OK`
112 changes: 112 additions & 0 deletions source/includes/articles/companies/notes/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
## <a name="company_notes_create"></a>Create a new company note

> Request body | `POST /articles/company_notes`
```JSON
{
"data": {
"type": "company_notes",
"attributes": {
"category": "History",
"body": "The note text.",
"cite_url": "http://ign.com/article",
"cite_title": "The Article Title",
"cite_website": "IGN"
}
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
}
}
}
```

> Response body | `HTTP 201`

```JSON
{
"data": {
"id": "14",
"type": "company_notes",
"attributes": {
"category": "History",
"body": "The note text.",
"cite_url": "http://ign.com/article",
"cite_title": "The Article Title",
"cite_website": "IGN"
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"created_by": {
"data": {
"id": "2",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/2"
}
}
}
},
"meta": {
"keywords": "nintendo co., ltd., notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "The note text.",
"created_at": "2017-05-18T21:42:31.019Z",
"updated_at": "2017-05-18T21:42:31.019Z"
}
}
```

Create a new company note record. A note is a fact, story or piece of trivia about a company. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/company_notes`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | See [Category](#company_notes_cat).
body | string | Y | The note text. 5-2000 chars.
cite_url | string | | The URL of the source web page. 5-250 chars.
cite_title | string | | The title of the source web page. 5-250 chars.
cite_website | string | | The name of the source website. 1-100 chars.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
company | belongs_to | Y | companies | The company the name belongs to.

### <a name="company_notes_cat"></a>Category

The `category` attribute accepts the following values.

Value | Description
---- | -----------
history | Notes related to the history of the company.
organization | Notes related to the structure of the company.
products | Notes related to the company's products.
tech | Notes related to the company's innovations and technologies used.
impact | Notes related to the company's achievements and impact on the wider world.

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/companies/notes/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="company_notes_delete"></a>Delete a company note

Delete an existing company note. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/company_notes/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
15 changes: 15 additions & 0 deletions source/includes/articles/companies/notes/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## <a name="company_notes_errors"></a>Errors

Errors specific to creating and updating company notes.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | COMPANY_NOTE_CATEGORY_BLANK | category | Category is required.
400 | COMPANY_NOTE_CATEGORY_INCLUSION | category | Category must be an accepted value.
400 | COMPANY_NOTE_BODY_BLANK | body | Body is required.
400 | COMPANY_NOTE_BODY_TOO_SHORT | body | Body cannot be less than 5 characters.
400 | COMPANY_NOTE_BODY_TOO_LONG | body | Body cannot be more than 8000 characters.
400 | COMPANY_NOTE_CITE_URL_TOO_SHORT | cite_url | Cite URL cannot be less than 5 characters.
400 | COMPANY_NOTE_CITE_URL_TOO_LONG | cite_url | Cite URL cannot be more than 250 characters.
400 | COMPANY_NOTE_CITE_TITLE_TOO_LONG | cite_title | Cite title cannot be more than 250 characters.
400 | COMPANY_NOTE_CITE_WEBSITE_TOO_LONG | cite_website | Cite website cannot be more than 100 characters.
100 changes: 100 additions & 0 deletions source/includes/articles/companies/notes/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
## Get all of a company's titles

> Response body | `HTTP 200`
```JSON
# GET /articles/company_notes?page[size]=2

{
"data": [
{
"id": "1",
"type": "company_notes",
"attributes": {
"category": "History",
"body": "Nintendo was a playing card manufacturer before it started making video games.",
"cite_url": "",
"cite_title": "",
"cite_website": ""
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
},
{
"id": "2",
"type": "company_notes",
"attributes": {
"category": "Significance",
"body": "The first video game console ever played in space was made by Nintendo. Aleksandr Serebrov played Tetris on a Game Boy.",
"cite_url": "",
"cite_title": "",
"cite_website": ""
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
}
],
"links": {},
"meta": {
"total_items": 3
}
}
```

Retrieve all company notes. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/company_notes`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[company_notes]=body`
filter[{field}] | All records | Filter search by field, e.g. `?filter[category]=Hist`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
11 changes: 11 additions & 0 deletions source/includes/articles/companies/notes/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <a name="company_notes_intro"></a>Articles: Company Notes

Resources related to company notes. Notes are trivia, stories or facts about a company.

### Request attributes

See [Create a new company note](#company_notes_create) and [Update a company note](#company_notes_update).

### Response attributes

See [Get a single company note](#company_notes_show)
81 changes: 81 additions & 0 deletions source/includes/articles/companies/notes/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
## <a name="company_notes_show"></a>Get a single company note

> Response body | `HTTP 200`
```JSON
# GET /articles/company_notes/1

{
"data": {
"id": "1",
"type": "company_notes",
"attributes": {
"category": "History",
"body": "Nintendo was a playing card manufacturer before it started making video games.",
"cite_url": "",
"cite_title": "",
"cite_website": ""
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
},
"meta": {
"keywords": "nintendo co., ltd., notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "Nintendo was a playing card manufacturer before it started making video games.",
"created_at": "2017-05-17T21:40:00.986Z",
"updated_at": "2017-05-17T21:40:00.986Z"
}
}
```

Retrieve a single company note. Game notes are publicly available. No sign-in is required.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/company_notes/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`

### <a name="company_notes_response_attrs"></a>Response attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | See [Category](#company_notes_cat).
body | string | Y | The note text. 5-2000 chars.
cite_url | string | | The URL of the source web page. 5-250 chars.
cite_title | string | | The title of the source web page. 5-250 chars.
cite_website | string | | The name of the source website. 1-100 chars.

### Relationships

Association | Record type | Relationship type
------------ | ---------- | -----------------
company | companies | belongs_to
created_by | users | belongs_to

### Meta

The `meta` section of the JSON response includes `keywords`, `description`, `created_at` and `updated_at` attributes.
94 changes: 94 additions & 0 deletions source/includes/articles/companies/notes/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
## <a name="company_notes_update"></a>Update a company note

> Request body | `PATCH /articles/company_notes/1`
```JSON
{
"data": {
"type": "company_notes",
"id": "1",
"attributes": {
"category": "History",
"body": "The updated note text.",
"cite_url": "http://ign.com/updated",
"cite_title": "The Updated Title",
"cite_website": "IGN"
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "1",
"type": "company_notes",
"attributes": {
"category": "History",
"body": "The updated note text.",
"cite_url": "http://ign.com/updated",
"cite_title": "The Updated Title",
"cite_website": "IGN"
},
"relationships": {
"company": {
"data": {
"id": "1",
"type": "companies"
},
"links": {
"related": "http://localhost:3000/articles/companies/nintendo-co-ltd"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
},
"meta": {
"keywords": "nintendo co., ltd., notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "The updated note text.",
"created_at": "2017-05-17T21:40:00.986Z",
"updated_at": "2017-05-18T21:55:39.825Z"
}
}
```

Update an existing company note. The user must be an editor.

* User authentication: required
* Authorization level: admin

### HTTP request

`PATCH /articles/company_notes/{id}` (replace `{id}` with record ID)

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | See [Category](#company_notes_cat).
body | string | Y | The note text. 5-2000 chars.
cite_url | string | | The URL of the source web page. 5-250 chars.
cite_title | string | | The title of the source web page. 5-250 chars.
cite_website | string | | The name of the source website. 1-100 chars.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
version | belongs_to | | company_versions | Version must belong to same company as title.

### Success HTTP response code

`200 OK`
182 changes: 182 additions & 0 deletions source/includes/articles/games/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
## <a name="games_create"></a>Create a new game

> Request body | `POST /articles/games`
```JSON
{
"data": {
"type": "games",
"attributes": {
"display_title": "New Game",
"description": "New Game is an action game developed by some company or other.",
"origin_date": "2015-01-03",
"origin_year": ""
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "50",
"type": "games",
"attributes": {
"display_title": "New Game",
"description": "New Game is an action game developed by some company or other.",
"slug": "new-game",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": null,
"status": "draft",
"origin_date": "2015-01-03",
"origin_year": 2015
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
"created_by": {
"data": {
"id": "2",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/2"
}
},
"last_reviewed_by": {
"data": null
},
"titles": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/new-game/titles"
}
},
"notes": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/new-game/notes"
}
},
"genres": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/new-game/genres"
}
},
"versions": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/new-game/versions"
}
},
"images": {
"data": [
{
"id": "1",
"type": "images"
}
],
"links": {
"related": "http://localhost:3000/articles/games/new-game/images"
}
},
"company_credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/new-game/company_credits"
}
},
"person_credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/new-game/company_credits"
}
}
},
"links": {
"self": "http://localhost:3000/articles/games/new-game"
}
},
"included": [
{
"id": "1",
"type": "images",
"attributes": {
"file": "http://localhost:3000/uploads/images/1/nintendo-hq-kyoto-2006.jpg",
"title": "Nintendo office"
},
"links": {
"self": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
{
"id": "2",
"type": "users",
"attributes": {
"username": "neil",
"avatar": "http://localhost:3000/uploads/user_avatar/2/1706221451.jpg"
},
"links": {
"self": "http://localhost:3000/users/2"
}
}
],
"meta": {
"keywords": "New Game, 2015, game, credits, screenshots, trivia, dbljump, video games, pc games, gaming",
"description": "Find New Game trivia, screenshots, credits and other info at Dbljump, the video game reference.",
"created_at": "2017-06-27T22:31:20.875Z",
"updated_at": "2017-06-27T22:31:20.875Z"
}
}
```

Create a new game article. User must be an editor or admin. The genres relationship cannot be edited.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/games`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
display_title | string | Y | 1-250 characters.
description | text | | 1-800 characters.
origin_date | date | | Between 1st Jan 1800 and the present.
origin_year | integer | | Between 1800 and the present year.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
primary_image | belongs_to | | images | The main article image, usually a game poster.

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/games/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="games_delete"></a>Delete a game

Delete an existing game article. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/games/{slug}` (replace `{slug}` with record slug)

### Success HTTP response code

`204 No Content`
11 changes: 11 additions & 0 deletions source/includes/articles/games/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## <a name="games_errors"></a>Errors

Errors specific to creating and updating game articles.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | GAME_DISPLAY_TITLE_BLANK | display_title | Display title is required.
400 | GAME_DISPLAY_TITLE_TOO_LONG | display_title | Display title cannot be more than 250 characters.
400 | GAME_DESCRIPTION_TOO_LONG | description | Description cannot be more than 800 characters.
400 | GAME_ORIGIN_DATE_INCLUSION | origin_date | Release date must be a past date not before 1800.
400 | GAME_ORIGIN_YEAR_INCLUSION | origin_year | Release year must be a past year not before 1800.
92 changes: 92 additions & 0 deletions source/includes/articles/games/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
## Get all games

> Response body | `HTTP 200`
```JSON
# GET /articles/games?page[size]=2

{
"data": [
{
"id": "45",
"type": "games",
"attributes": {
"display_title": "Pong",
"description": "Pong is a table tennis sports game and is one of the earliest arcade video games.",
"origin_date": "1972-11-29",
"origin_year": 1972,
"slug": "pong"
},
"relationships": {
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
},
"links": {
"self": "http://localhost:3000/articles/games/pong"
}
},
{
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101",
"description": "The Wonderful 101 is an action-adventure video game developed by Platinum Games for the Nintendo Wii U.",
"origin_date": "2013-08-23",
"origin_year": 2013,
"slug": "the-wonderful-101"
},
"relationships": {
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
}
],
"links": {
"self": "http://localhost:3000/articles/games?page%5Bnumber%5D=1&page%5Bsize%5D=2",
"next": "http://localhost:3000/articles/games?page%5Bnumber%5D=2&page%5Bsize%5D=2",
"last": "http://localhost:3000/articles/games?page%5Bnumber%5D=2&page%5Bsize%5D=2"
},
"meta": {
"total_items": 3
}
}
```

Retrieve all game articles. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/games`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[games]=display_title,origin_date`
filter[{field}] | All records | Filter search by field, e.g. `?filter[origin_year]=2015`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
11 changes: 11 additions & 0 deletions source/includes/articles/games/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <a name="games_intro"></a>Articles: Games

Resources related to game articles.

### Request attributes

See [Create a new game](#games_create) and [Update a game](#games_update).

### Response attributes

See [Get a single game](#games_show)
214 changes: 214 additions & 0 deletions source/includes/articles/games/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
## <a name="games_show"></a>Get a single game

> Response body | `HTTP 200`
```JSON
# GET /articles/games/the-wonderful-101

{
"data": {
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101",
"description": "The Wonderful 101 is an action-adventure video game developed by Platinum Games for the Nintendo Wii U.",
"slug": "the-wonderful-101",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": "2017-06-28T17:04:28.473Z",
"status": "published",
"origin_date": "2013-08-23",
"origin_year": 2013
},
"relationships": {
"primary_image": {
"data": null,
"links": {
"related": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
},
"titles": {
"data": [
{
"id": "58",
"type": "game_titles"
},
{
"id": "59",
"type": "game_titles"
},
{
"id": "60",
"type": "game_titles"
}
],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/titles"
}
},
"notes": {
"data": [
{
"id": "12",
"type": "game_notes"
}
],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/notes"
}
},
"genres": {
"data": [
{
"id": "1",
"type": "genres"
},
{
"id": "2",
"type": "genres"
},
{
"id": "23",
"type": "genres"
}
],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/genres"
}
},
"versions": {
"data": [
{
"id": "1",
"type": "game_versions"
}
],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/versions"
}
},
"images": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/images"
}
},
"company_credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/company_credits"
}
},
"person_credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101/company_credits"
}
}
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"included": [
{
"id": "1",
"type": "users",
"attributes": {
"username": "tikithekiwi",
"avatar": null
},
"links": {
"self": "http://localhost:3000/users/1"
}
},
{
"id": "1",
"type": "genres",
"attributes": {
"name": "action",
"short_name": ""
},
"links": {
"self": "http://localhost:3000/genres/action"
}
},
{
"id": "2",
"type": "genres",
"attributes": {
"name": "adventure",
"short_name": ""
},
"links": {
"self": "http://localhost:3000/genres/adventure"
}
},
{
"id": "23",
"type": "genres",
"attributes": {
"name": "comedy",
"short_name": ""
},
"links": {
"self": "http://localhost:3000/genres/comedy"
}
}
],
"meta": {
"keywords": "The Wonderful 101, 2013, game, credits, screenshots, trivia, dbljump, video games, pc games, gaming",
"description": "Find The Wonderful 101 trivia, screenshots, credits and other info at Dbljump, the video game reference.",
"created_at": "2017-06-28T17:04:28.478Z",
"updated_at": "2017-06-28T17:04:28.478Z"
}
}
```

Retrieve a single game article. Games are publicly available. No sign-in is required.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/games/{slug}` (replace `{slug}` with record slug)

### Success HTTP response code

`200 OK`

### <a name="person_response_attrs"></a>Response attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
display_title | string | Y | The article title, usually the company name.
description | text | | A short biography up to 800 chars.
origin_date | date | | Between 1st Jan 1800 and the present.
origin_year | integer | | Between 1800 and the present year.

### Relationships

Association | Record type | Relationship type
------------ | ---------- | -----------------
created_by | users | belongs_to
genres | genres | has_many
primary_image | images | belongs_to

### Meta

The `meta` section of the JSON response includes `keywords`, `description`, `created_at` and `updated_at` attributes.
234 changes: 234 additions & 0 deletions source/includes/articles/games/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
## <a name="games_update"></a>Update a game

> Request body | `PATCH /articles/games/dark-souls`
```JSON
{
"data": {
"type": "games",
"id": "pong",
"attributes": {
"display_title": "Changed Name",
"description": "Updated description for an updated article.",
"origin_date": "1995-11-17",
"origin_year": ""
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
}
},
"genres": {
"data": [
{ "type": "genres", "id": "5" },
{ "type": "genres", "id": "12" }
]
}
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "47",
"type": "games",
"attributes": {
"display_title": "Changed Name",
"description": "Updated description for an updated article.",
"slug": "changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41",
"last_submitted_at": null,
"last_reviewed_at": null,
"last_review_outcome": null,
"last_review_comments": null,
"published_at": "2017-06-28T17:04:28.494Z",
"status": "published",
"origin_date": "1995-11-17",
"origin_year": 1995
},
"relationships": {
"primary_image": {
"data": {
"id": "1",
"type": "images"
},
"links": {
"related": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
},
"last_reviewed_by": {
"data": null
},
"titles": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/titles"
}
},
"notes": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/notes"
}
},
"genres": {
"data": [
{
"id": "12",
"type": "genres"
},
{
"id": "5",
"type": "genres"
}
],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/genres"
}
},
"versions": {
"data": [
{
"id": "2",
"type": "game_versions"
},
{
"id": "3",
"type": "game_versions"
},
{
"id": "4",
"type": "game_versions"
}
],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/versions"
}
},
"images": {
"data": [
{
"id": "1",
"type": "images"
}
],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/images"
}
},
"company_credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/company_credits"
}
},
"person_credits": {
"data": [],
"links": {
"related": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41/company_credits"
}
}
},
"links": {
"self": "http://localhost:3000/articles/games/changed-name-7f116bac-0ccd-421e-bc25-090cccc63a41"
}
},
"included": [
{
"id": "1",
"type": "images",
"attributes": {
"file": "http://localhost:3000/uploads/images/1/nintendo-hq-kyoto-2006.jpg",
"title": "Nintendo office"
},
"links": {
"self": "http://localhost:3000/media/images/nintendo-office-photo"
}
},
{
"id": "1",
"type": "users",
"attributes": {
"username": "tikithekiwi",
"avatar": null
},
"links": {
"self": "http://localhost:3000/users/1"
}
},
{
"id": "12",
"type": "genres",
"attributes": {
"name": "role-playing game",
"short_name": "RPG"
},
"links": {
"self": "http://localhost:3000/genres/role-playing-game"
}
},
{
"id": "5",
"type": "genres",
"attributes": {
"name": "educational",
"short_name": ""
},
"links": {
"self": "http://localhost:3000/genres/educational"
}
}
],
"meta": {
"keywords": "Changed Name, 1995, PlayStation 3, Xbox 360, Windows, game, credits, screenshots, trivia, dbljump, video games, pc games, gaming",
"description": "Find Changed Name trivia, screenshots, credits and other info at Dbljump, the video game reference.",
"created_at": "2017-06-28T17:04:28.500Z",
"updated_at": "2017-06-28T17:08:46.331Z"
}
}
```

Update an existing game article. The user must be an editor. The genres relationship can be edited.

* User authentication: required
* Authorization level: admin

### HTTP request

`PATCH /articles/games/{slug}` (replace `{slug}` with record slug)

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
display_title | string | Y | 1-250 characters.
description | text | | 1-800 characters.
origin_date | date | | Between 1st Jan 1800 and the present.
origin_year | integer | | Between 1800 and the present year.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
primary_image | belongs_to | | images | The main article image, usually a game poster.
genres | has_many | | genres | The genres this game belongs to.

### Success HTTP response code

`200 OK`
119 changes: 119 additions & 0 deletions source/includes/articles/games/aliases/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
## Create a new game alias

> Request body | `POST /articles/game_aliases`
```JSON
{
"data": {
"type": "game_aliases",
"attributes": {
"display_text": "New Title",
"kind": "title",
"writing_system": "Latin"
},
"relationships": {
"game": {
"data": {
"id": "47",
"type": "games"
}
},
"place": {
"data": {
"id": "17",
"type": "places"
}
},
"version": {
"data": {
"id": "2",
"type": "game_versions"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "62",
"type": "game_aliases",
"attributes": {
"display_text": "New Title",
"kind": "title",
"writing_system": "Latin"
},
"relationships": {
"game": {
"data": {
"id": "47",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/dark-souls"
}
},
"place": {
"data": {
"id": "17",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/bangladesh"
}
},
"version": {
"data": {
"id": "2",
"type": "versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/2"
}
}
}
},
"included": [
{
"id": "47",
"type": "games",
"attributes": {
"display_title": "Dark Souls"
},
"links": {
"self": "http://localhost:3000/articles/games/dark-souls"
}
},
{
"id": "17",
"type": "places",
"attributes": {
"name": "Bangladesh"
},
"links": {
"self": "http://localhost:3000/places/bangladesh"
}
}
],
"meta": {
"keywords": "new title, dark souls, bangladesh, name, title, alias, dbljump, video games, pc games, gaming",
"description": "New Title is an alternate name or title for Dark Souls. Learn more at Dbljump, the video game reference.",
"created_at": "2017-05-13T12:43:38.980Z",
"updated_at": "2017-05-13T12:43:38.980Z"
}
}
```

Create a new game alias record. User must be an editor or admin.

### HTTP request

`POST /articles/game_aliases`

### Success HTTP response code

`201 Created`
11 changes: 11 additions & 0 deletions source/includes/articles/games/aliases/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Delete a game alias

Delete an existing game alias. User must be an editor or admin.

### HTTP request

`DELETE /articles/game_aliases/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
15 changes: 15 additions & 0 deletions source/includes/articles/games/aliases/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Errors

Errors specific to creating and updating game aliases.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | GAME_ALIAS_DISPLAY_TEXT_BLANK | title | Display text is required.
400 | GAME_ALIAS_DISPLAY_TEXT_TOO_LONG | title | Display text cannot be more than 250 characters.
400 | GAME_ALIAS_DISPLAY_TEXT_TAKEN | title | Display text must be unique to its parent company.
400 | GAME_ALIAS_KIND_BLANK | kind | Kind is required.
400 | GAME_ALIAS_KIND_INCLUSION | kind | Kind must be an accepted value.
400 | GAME_ALIAS_WRITING_SYSTEM_BLANK | writing_system | Writing system is required.
400 | GAME_ALIAS_WRITING_SYSTEM_INCLUSION | writing_system | Writing system must be an accepted value.
400 | GAME_ALIAS_PLACE_ID_INVALID | data/relationships/place/data/id | Place ID must be a valid country or region ID.
400 | GAME_ALIAS_VERSION_ID_INVALID | data/relationships/version/data/id | Version ID must belong to the parent game.
88 changes: 88 additions & 0 deletions source/includes/articles/games/aliases/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## Get a collection of game aliases

> Response body | `HTTP 200`
```JSON
# GET /articles/game_aliases?page[size]=2

{
"data": [
{
"id": "58",
"type": "game_aliases",
"attributes": {
"display_text": "Project P-100",
"kind": "working",
"writing_system": "Latin"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"place": {
"data": null
},
"version": {
"data": null
}
}
},
{
"id": "59",
"type": "game_aliases",
"attributes": {
"display_text": "Za Wandafuru Wan Ō Wan",
"kind": "title",
"writing_system": "Latin"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"place": {
"data": {
"id": "102",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/japan"
}
},
"version": {
"data": null
}
}
}
],
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101/titles?page%5Bnumber%5D=1&page%5Bsize%5D=2",
"next": "http://localhost:3000/articles/games/the-wonderful-101/titles?page%5Bnumber%5D=2&page%5Bsize%5D=2",
"last": "http://localhost:3000/articles/games/the-wonderful-101/titles?page%5Bnumber%5D=2&page%5Bsize%5D=2"
},
"meta": {
"total_items": 3
}
}
```

Retrieve a collection of game aliases.

### HTTP request

`GET /articles/game_aliases`

### Success HTTP response code

`200 OK`
25 changes: 25 additions & 0 deletions source/includes/articles/games/aliases/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Articles: Game Aliases

Resources related to game aliases. An alias is another title the game is known by. The JSON:API type is `game_aliases`.

### Mutable attributes

#### `display_text` (string, required)

The alias. 1-250 chars.

#### `kind` (string, required)

Name classification. Must be `title`, `working` or `translated`.

#### `writing_system` (string, required)

Must be `Latin`, `Japanese`, `Cyrillic`, `Chinese` or `Arabic`.

### Relationships

Name | JSON:API type | Relationship type | Required?
------------ | --------------- | ----------------- | ---------
`game` | `games` | `belongs_to` | Y
`version` | `game_versions` | `belongs_to` |
`place` | `places` | `belongs_to` |
70 changes: 70 additions & 0 deletions source/includes/articles/games/aliases/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## Get a single game alias

> Response body | `HTTP 200`
```JSON
# GET /articles/game_aliases/58

{
"data": {
"id": "58",
"type": "game_aliases",
"attributes": {
"title": "Project P-100",
"kind": "working",
"writing_system": "Latin"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"place": {
"data": null,
"links": {
"related": "http://localhost:3000/places/bangladesh"
}
},
"version": {
"data": null,
"links": {
"related": "http://localhost:3000/articles/game_versions/2"
}
}
}
},
"included": [
{
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101"
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
}
],
"meta": {
"keywords": "project p-100, the wonderful 101, name, title, alias, dbljump, video games, pc games, gaming",
"description": "Project P-100 is an alternate name or title for The Wonderful 101. Learn more at Dbljump, the video game reference.",
"created_at": "2017-04-24T09:09:19.450Z",
"updated_at": "2017-04-24T09:09:19.450Z"
}
}
```

Retrieve a single game alias.

### HTTP request

`GET /articles/game_aliases/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`
114 changes: 114 additions & 0 deletions source/includes/articles/games/aliases/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
## Update a game alias

> Request body | `PATCH /articles/game_aliases/58`
```JSON
{
"data": {
"type": "game_aliases",
"id": "58",
"attributes": {
"title": "アップデート",
"kind": "title",
"writing_system": "Japanese"
},
"relationships": {
"place": {
"data": {
"id": "102",
"type": "places"
}
},
"version": {
"data": {
"id": "1",
"type": "game_versions"
}
}
}
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "58",
"type": "game_aliases",
"attributes": {
"title": "アップデート",
"kind": "title",
"writing_system": "Japanese"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"place": {
"data": {
"id": "102",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/japan"
}
},
"version": {
"data": {
"id": "1",
"type": "versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
}
}
},
"included": [
{
"id": "46",
"type": "games",
"attributes": {
"display_title": "The Wonderful 101"
},
"links": {
"self": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
{
"id": "102",
"type": "places",
"attributes": {
"name": "Japan"
},
"links": {
"self": "http://localhost:3000/places/japan"
}
}
],
"meta": {
"keywords": "アップデート, the wonderful 101, japan, name, title, alias, dbljump, video games, pc games, gaming",
"description": "アップデート is an alternate name or title for The Wonderful 101. Learn more at Dbljump, the video game reference.",
"created_at": "2017-04-24T09:09:19.450Z",
"updated_at": "2017-05-13T12:58:30.190Z"
}
}
```

Update an existing game alias. The user must be an editor or admin.

### HTTP request

`PATCH /articles/game_aliases/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`
131 changes: 131 additions & 0 deletions source/includes/articles/games/notes/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
## <a name="game_notes_create"></a>Create a new game note

> Request body | `POST /articles/game_notes`
```JSON
{
"data": {
"type": "game_notes",
"attributes": {
"category": "Development",
"body": "The note text.",
"cite_url": "http://ign.com/article",
"cite_title": "The Article Title",
"cite_website": "IGN"
},
"relationships": {
"game": {
"data": {
"id": "47",
"type": "games"
}
},
"version": {
"data": {
"id": "2",
"type": "game_versions"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "13",
"type": "game_notes",
"attributes": {
"category": "Development",
"body": "The note text.",
"cite_url": "http://ign.com/article",
"cite_title": "The Article Title",
"cite_website": "IGN"
},
"relationships": {
"game": {
"data": {
"id": "47",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/dark-souls"
}
},
"version": {
"data": {
"id": "2",
"type": "versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/2"
}
},
"created_by": {
"data": {
"id": "2",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/2"
}
}
}
},
"meta": {
"keywords": "dark souls, notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "The note text.",
"created_at": "2017-05-17T21:44:11.984Z",
"updated_at": "2017-05-17T21:44:11.984Z"
}
}
```

Create a new game note. A note is a fact, story or piece of trivia about a game. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/game_notes`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | See [Category](#game_notes_cat).
body | string | Y | The note text. 5-2000 chars.
cite_url | string | | The URL of the source web page. 5-250 chars.
cite_title | string | | The title of the source web page. 5-250 chars.
cite_website | string | | The name of the source website. 1-100 chars.

### <a name="game_notes_cat"></a>Category

The `category` attribute accepts the following values.

Value | Description
----- | -----------
development | Notes related to the creation of the game software.
publishing | Notes related to publishing and release of the game.
tech | Notes related to the technologies used in the game, including graphics.
sound | Notes related to music and sound in the game.
game | Notes related to the game's content and how it plays.
story | Notes related to the game's story.
impact | Notes related to the game's achievements and impact on the wider world.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
game | belongs_to | Y | games | The game the note belongs to.
version | belongs_to | | game_versions | Version must belong to same game as note.

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/games/notes/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="game_notes_delete"></a>Delete a game note

Delete an existing game note. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/game_notes/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
16 changes: 16 additions & 0 deletions source/includes/articles/games/notes/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## <a name="game_notes_errors"></a>Errors

Errors specific to creating and updating game notes.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | GAME_NOTE_VERSION_ID_INVALID | data/relationships/version/data/id | Version ID must belong to the parent game.
400 | GAME_NOTE_CATEGORY_BLANK | category | Category is required.
400 | GAME_NOTE_CATEGORY_INCLUSION | category | Category must be an accepted value.
400 | GAME_NOTE_BODY_BLANK | body | Body is required.
400 | GAME_NOTE_BODY_TOO_SHORT | body | Body cannot be less than 5 characters.
400 | GAME_NOTE_BODY_TOO_LONG | body | Body cannot be more than 8000 characters.
400 | GAME_NOTE_CITE_URL_TOO_SHORT | cite_url | Cite URL cannot be less than 5 characters.
400 | GAME_NOTE_CITE_URL_TOO_LONG | cite_url | Cite URL cannot be more than 250 characters.
400 | GAME_NOTE_CITE_TITLE_TOO_LONG | cite_title | Cite title cannot be more than 250 characters.
400 | GAME_NOTE_CITE_WEBSITE_TOO_LONG | cite_website | Cite website cannot be more than 100 characters.
75 changes: 75 additions & 0 deletions source/includes/articles/games/notes/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
## Get all game notes

> Response body | `HTTP 200`
```JSON
# GET /articles/game_notes?page[size]=2

{
"data": [
{
"id": "12",
"type": "game_notes",
"attributes": {
"category": "Development",
"body": "Was originally intended to feature an all-star cast of Nintendo characters.",
"cite_url": "https://www.unseen64.net/2014/10/24/wiiu-the-wonderful-101-beta-development",
"cite_title": "The Wonderful 101 [Beta / Concept – Wii U]",
"cite_website": "Unseen64"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": null,
"links": {
"related": "http://localhost:3000/articles/game_versions/2"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
}
],
"links": {},
"meta": {
"total_items": 1
}
}
```

Retrieve all game notes. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/game_notes`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[game_notes]=body`
filter[{field}] | All records | Filter search by field, e.g. `?filter[category]=Development`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
11 changes: 11 additions & 0 deletions source/includes/articles/games/notes/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <a name="game_notes_intro"></a>Articles: Game Notes

Resources related to game notes. Notes are trivia, stories or facts about a game.

### Request attributes

See [Create a new game note](#game_notes_create) and [Update a game note](#game_notes_update).

### Response attributes

See [Get a single game note](#game_notes_show)
88 changes: 88 additions & 0 deletions source/includes/articles/games/notes/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## <a name="game_notes_show"></a>Get a single game note

> Response body | `HTTP 200`
```JSON
# GET /articles/game_notes/12

{
"data": {
"id": "12",
"type": "game_notes",
"attributes": {
"category": "Development",
"body": "Was originally intended to feature an all-star cast of Nintendo characters.",
"cite_url": "https://www.unseen64.net/2014/10/24/wiiu-the-wonderful-101-beta-development",
"cite_title": "The Wonderful 101 [Beta / Concept – Wii U]",
"cite_website": "Unseen64"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": null,
"links": {
"related": "http://localhost:3000/articles/game_versions/2"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
},
"meta": {
"keywords": "the wonderful 101, notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "Was originally intended to feature an all-star cast of Nintendo characters.",
"created_at": "2017-05-17T21:40:11.512Z",
"updated_at": "2017-05-17T21:40:11.512Z"
}
}
```

Retrieve a single game note. Game notes are publicly available. No sign-in is required.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/game_notes/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`200 OK`

### <a name="game_notes_response_attrs"></a>Response attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | See [Category](#game_notes_cat).
body | string | Y | The note text. 5-2000 chars.
cite_url | string | | The URL of the source web page. 5-250 chars.
cite_title | string | | The title of the source web page. 5-250 chars.
cite_website | string | | The name of the source website. 1-100 chars.

### Relationships

Association | Record type | Relationship type
------------ | ---------- | -----------------
game | games | belongs_to
version | game_versions | belongs_to
created_by | users | belongs_to

### Meta

The `meta` section of the JSON response includes `keywords`, `description`, `created_at` and `updated_at` attributes.
138 changes: 138 additions & 0 deletions source/includes/articles/games/notes/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
## <a name="game_notes_update"></a>Update a game note

> Request body | `PATCH /articles/game_notes/12`
```JSON
{
"data": {
"id": "12",
"type": "game_notes",
"attributes": {
"category": "Development",
"body": "Updated note text.",
"cite_url": "http://ign.com/article",
"cite_title": "The Article Title",
"cite_website": "IGN"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": {
"id": "1",
"type": "versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
},
"meta": {
"keywords": "the wonderful 101, notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "Updated note text.",
"created_at": "2017-05-17T21:40:11.512Z",
"updated_at": "2017-05-17T22:36:47.774Z"
}
}
```

> Response body | `HTTP 200`
```JSON
{
"data": {
"id": "12",
"type": "game_notes",
"attributes": {
"category": "Development",
"body": "Updated note text.",
"cite_url": "http://ign.com/article",
"cite_title": "The Article Title",
"cite_website": "IGN"
},
"relationships": {
"game": {
"data": {
"id": "46",
"type": "games"
},
"links": {
"related": "http://localhost:3000/articles/games/the-wonderful-101"
}
},
"version": {
"data": {
"id": "1",
"type": "versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"created_by": {
"data": {
"id": "1",
"type": "users"
},
"links": {
"related": "http://localhost:3000/users/1"
}
}
}
},
"meta": {
"keywords": "the wonderful 101, notes, trivia, facts, dbljump, video games, pc games, gaming",
"description": "Updated note text.",
"created_at": "2017-05-17T21:40:11.512Z",
"updated_at": "2017-05-17T22:36:47.774Z"
}
}
```

Update an existing game note. The user must be an editor.

* User authentication: required
* Authorization level: admin

### HTTP request

`PATCH /articles/game_notes/{id}` (replace `{id}` with record ID)

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
category | string | Y | See [Category](#game_notes_cat).
body | string | Y | The note text. 5-2000 chars.
cite_url | string | | The URL of the source web page. 5-250 chars.
cite_title | string | | The title of the source web page. 5-250 chars.
cite_website | string | | The name of the source website. 1-100 chars.

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
version | belongs_to | | game_versions | Version must belong to same game as title.

### Success HTTP response code

`200 OK`
117 changes: 117 additions & 0 deletions source/includes/articles/games/version_releases/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
## <a name="version_releases_create"></a>Create a new game version release

> Request body | `POST /articles/game_version_releases`
```JSON
{
"data": {
"type": "version_releases",
"attributes": {
"date": "2013-08-01",
"year": "",
"physical": "false",
"digital": "true"
},
"relationships": {
"version": {
"data": {
"id": "1",
"type": "game_versions"
}
},
"place": {
"data": {
"id": "102",
"type": "places"
}
}
}
}
}
```

> Response body | `HTTP 201`
```JSON
{
"data": {
"id": "13",
"type": "version_releases",
"attributes": {
"date": "2013-08-01",
"year": 2013,
"physical": false,
"digital": true
},
"relationships": {
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": {
"id": "1",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/afghanistan"
}
}
}
},
"included": [
{
"id": "1",
"type": "places",
"attributes": {
"formatted": "Afghanistan"
},
"links": {
"self": "http://localhost:3000/places/afghanistan"
}
}
],
"meta": {
"keywords": "The Wonderful 101, Wii U, Afghanistan, release, dbljump, video games, pc games, gaming",
"description": "",
"created_at": "2017-06-27T20:48:15.095Z",
"updated_at": "2017-06-27T20:48:15.095Z"
}
}
```

Create a new game version release. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`POST /articles/game_version_releases`

### Request attributes

Attribute | Type | Req'd? | Description
--------- | ---- | ------ | -----------
date | date | | Release date, e.g. '2013-08-24' for 24 August 2013.
year | number | | Release year. Auto-filled if date present.
physical | boolean | | True if release included physical format (e.g. disc or cartridge)
digital | boolean | | True if release included digital format (i.e. download)

### Relationships

Check this section's code example to see how to update these relationships.

Name | Relationship | Req'd? | JSON:API type | Description
---- | ------------ | ------ | ------------- | -----------
version | belongs_to | Y | game_versions | The version the release belongs to.
place | belongs_to | Y | places | Release country or region. There can be one game version release per place.

### Success HTTP response code

`201 Created`
14 changes: 14 additions & 0 deletions source/includes/articles/games/version_releases/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## <a name="version_releases_delete"></a>Delete a game version release

Delete an existing game version release. User must be an editor or admin.

* User authentication: required
* Authorization level: editor or admin

### HTTP request

`DELETE /articles/game_version_releases/{id}` (replace `{id}` with record ID)

### Success HTTP response code

`204 No Content`
11 changes: 11 additions & 0 deletions source/includes/articles/games/version_releases/_errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## <a name="version_releases_errors"></a>Errors

Errors specific to creating and updating game version releaes.

HTTP code | Error code | Pointer | Title
--------- | ---------- | ------- | -----
400 | VERSION_RELEASE_PLACE_ID_BLANK | data/relationships/place/data/id | Place is required.
400 | VERSION_RELEASE_PLACE_ID_TAKEN | data/relationships/place/data/id | There's already a release of this version for that place.
400 | VERSION_RELEASE_PLACE_ID_INVALID | data/relationships/place/data/id | Status is required.
400 | VERSION_RELEASE_DATE_INCLUSION | date | Date must be after 1799 and not more than 3 years in the future.
400 | VERSION_RELEASE_YEAR_INCLUSION | year | Year must be after 1799 and not more than 3 years in the future.
128 changes: 128 additions & 0 deletions source/includes/articles/games/version_releases/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
## Get all of a version's releases

> Response body | `HTTP 200`
```JSON
# GET /articles/game_version_releases

{
"data": [
{
"id": "1",
"type": "version_releases",
"attributes": {
"date": "2013-08-23",
"year": 2013,
"physical": true,
"digital": true
},
"relationships": {
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": {
"id": "234",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/europe"
}
}
}
},
{
"id": "2",
"type": "version_releases",
"attributes": {
"date": "2013-09-15",
"year": 2013,
"physical": true,
"digital": true
},
"relationships": {
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": {
"id": "233",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/north-america"
}
}
}
},
{
"id": "3",
"type": "version_releases",
"attributes": {
"date": "2013-08-24",
"year": 2013,
"physical": true,
"digital": true
},
"relationships": {
"version": {
"data": {
"id": "1",
"type": "game_versions"
},
"links": {
"related": "http://localhost:3000/articles/game_versions/1"
}
},
"place": {
"data": {
"id": "102",
"type": "places"
},
"links": {
"related": "http://localhost:3000/places/japan"
}
}
}
}
],
"links": {},
"meta": {
"total_items": 3
}
}
```

Retrieve all game version releases. Automatically paginated.

* User authentication: not required
* Authorization level: n/a

### HTTP request

`GET /articles/game_version_releases`

### URL query parameters

Parameter | Default | Description
--------- | ------- | -----------
fields[{record-type}] | All fields | Return only specified fields, e.g. `?fields[version_releases]=date,year`
filter[{field}] | All records | Filter search by field, e.g. `?filter[year]=2013`
page[number] | 1 | Select the page number, e.g. `?page[number]=3`
page[size] | 30 | Select the number of records per page, e.g. `?page[size]=20`

### Success HTTP response code

`200 OK`
11 changes: 11 additions & 0 deletions source/includes/articles/games/version_releases/_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <a name="version_releases_intro"></a>Articles: Game Version Releases

Resources related to game version releases. A release is a region- or country-specific edition of a game version, e.g. the Japanese release of the PS3 version of Bayonetta.

### Request attributes

See [Create a new release](#version_releases_create) and [Update a release](#version_releases_update).

### Response attributes

See [Get a single version release](#version_releases_show)
Loading