Examples

This page contains additional examples without further elaboration. Each example is preceded by it’s ReStructuredText source.


.. json:object:: Github Issue
   :showexample:

   Information about a Github issue.

   :property id: Github assigned issue ID
   :proptype id: integer
   :options id: nullable, default=''
   :property url url: direct link to this issue
   :property url repository_url: direct link to the repository that
      this issue lives in
   :property url labels_url: retrieve and manipulate the labels
      associated with this issue
   :property url comments_url: retrieve and manipulate the comments
      associated with this issue
   :property url events_url: retrieve and manipulate the events associated
      with this issue
   :property html_url: HTML formatted information about this issue
   :proptype html_url: url
   :property integer number: raw issue number
   :property string state: current state of the issue
   :property string title: issue title
   :property string body: issue body
   :property user: embedded information about the user that created
   the issue
:proptype user: :json:object:`Github User`
Github Issue

Information about a Github issue.

Object Properties:
 
  • id (integer) – Github assigned issue ID (nullable, default=’‘)
  • url (url) – direct link to this issue
  • repository_url (url) – direct link to the repository that this issue lives in
  • labels_url (url) – retrieve and manipulate the labels associated with this issue
  • comments_url (url) – retrieve and manipulate the comments associated with this issue
  • events_url (url) – retrieve and manipulate the events associated with this issue
  • html_url (url) – HTML formatted information about this issue
  • number (integer) – raw issue number
  • state (string) – current state of the issue
  • title (string) – issue title
  • body (string) – issue body
  • user (Github User) – embedded information about the user that created the issue
JSON Example
{
    "events_url": "http://reynolds.com/",
    "body": "ZMbmEFgUyGnPIllYOBXA",
    "comments_url": "http://www.kling.net/",
    "state": "rkFCEotcZaBdAkdONhYw",
    "title": "hUVIVsvDkOKPghNLQUVU",
    "id": 7120,
    "labels_url": "http://batz.org/",
    "number": 3109,
    "repository_url": "http://rau.info/",
    "html_url": "http://leffler-schumm.com/",
    "url": "http://rau.net/",
    "user": {
        "id": 7020,
        "login": "pacochavalarie",
        "avatar_url": "http://weissnat.org/",
        "gravatar_url": "http://sauer.com/"
    }
}

.. json:object:: Error
   :showexample: yaml

   What a normal JSON error body looks like.

   :property string type:
   :property string title:
   :property integer status:
   :property string detail:
   :property uri instance:

   The semantics of this data type is described in :rfc:`7807`.
Error

What a normal JSON error body looks like.

Object Properties:
 

The semantics of this data type is described in RFC 7807.

YAML Example
%YAML 1.2
---
detail: AXwxOPNCLwwhiuzEcLVO
instance: http://www.dicki.com/app/category/terms/
status: 5411
title: SxYNhCwpOylRqnPiUoJp
type: nhnTvdbmkZmVyxoeaRrd

.. json:object:: Github User
   :showexample:

   What Github's API thinks a user looks like.

   :property user_name login: the user's unique login
   :property integer id: Github assigned unique user identifier
   :property url avatar_url: url to user's selected avatar image
   :property url gravatar_url: url to the user's gravatar image or
      the empty string
Github User

What Github’s API thinks a user looks like.

Object Properties:
 
  • login (user_name) – the user’s unique login
  • id (integer) – Github assigned unique user identifier
  • avatar_url (url) – url to user’s selected avatar image
  • gravatar_url (url) – url to the user’s gravatar image or the empty string
JSON Example
{
    "id": 5434,
    "login": "kmetz",
    "avatar_url": "http://glover-douglas.com/",
    "gravatar_url": "http://www.luettgen.com/"
}