Skip to content

Instantly share code, notes, and snippets.

23andme

{
	"name": "23AndMe",
    "desc": "23andMe is a personal genetics service. 23andMe offers individual genome and DNA testing and information. The 23andMe API allows developers to access and integrate the data from 23andMe with other applications and to create new applications. Individuals consent to giving third-party access to the 23andMe data. Some example API methods include accessing user information, retrieving profiles, and getting information on genotypes",
	"url": "https://api.23andme.com",
	"oauth2": {
		"authorize": "/authorize",
@netmilk
netmilk / apiary.apib
Last active December 15, 2015 00:36
Workaround for nullable MSON attributes in Dredd Ruby and Node.js hooks
# My API
# My Resource [/my_resource]
# Its Action [GET]
+ Response 200 (application/json)
+ Attributes (My Structure)
@netmilk
netmilk / hooks.js
Created December 21, 2015 22:52
Workaround Dredd hook for nullable type attributes in API Blueprint
var hooks = require('hooks');
// Recursively add null as acceptable type if there is string
// "#nullable" present in the property description
var patchPropertiesWithNullable = function(schema) {
if (typeof(schema['properties']) == 'object' && ! Array.isArray(schema['properties'])){
for (property in schema['properties']){
var partialSchemaToPatch = schema['properties'][property];
schema['properties'][property] = patchPropertiesWithNullable(partialSchemaToPatch);
};
@netmilk
netmilk / dredd-php-travis.md
Last active December 22, 2015 00:05
Using Dredd, PHP and Travis CI

Using API Blueprint, Dredd, PHP and Travis CI

In case you don't have Node.js installed locally use NVM:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
$ nvm install v0.12.2
$ nvm use v0.12.2
$ nvm alias default v0.12.2
@netmilk
netmilk / apiary.apib
Created February 16, 2016 11:34
API Blueprint with MSON circular reference
# API Name
## Message Resource [/resource]
### Create a Message [POST]
+ Request
+ Attributes (Message)
+ Response 200
+ Attributes
+ id (string)
@netmilk
netmilk / apiary.apib
Created February 19, 2016 14:39
Type Instance using MSON Inheritance and Fixed Type Attribute
# My API
## GET /message/{id}
+ Response 404 (application/json)
+ Attributes (Not Found)
## Data Structures
### Error (object)
@netmilk
netmilk / apiary.apib
Last active April 14, 2016 13:07
MSON Inheritance and Reference with an Object in an Array with bad syntax
# MSON Inheritance and Reference in Body Attribuets in Embed
[Documentation in Apiary](http://docs.embedbodyattributestest1.apiary.io/)
## Links to customized embeds
- [Custom mahine column ](http://rawgit.com/netmilk/ee037a5a56681ea7b39c/raw/6200066f781a5773d46dad055c160a8446131c6e/10.html)
- [Custom human column ](http://rawgit.com/netmilk/c697c9aacda05de0f1a1/raw/6c44ed735ccc8fee44ac6fddd776f0caf4699720/9.html)
- [Another Custom machine column](http://rawgit.com/netmilk/e7b65b7377dd1a9ee0a3/raw/05135483d8699333677750f8189e63f579f17ae3/12.html)
@netmilk
netmilk / swagger.yml
Created March 3, 2016 11:05
Apiary x-summary and x-description Swagger extensions example
swagger: '2.0'
info:
title: Polls API
description: Polls is a simple API allowing consumers to view polls and vote in them.
version: "8234aab51481d37a30757d925b7f4221a659427e"
host: polls.apiblueprint.org
schemes:
- https
paths:
/questions:
@netmilk
netmilk / apiary.apib
Created March 7, 2016 22:07
MSON Array of arrays of arrays
# MSON Array of arrays of arrays
# GET /polygon
+ Response 200 (application/json)
+ Attributes (Complex Polygon)
+ Body
[[[0, 0], [0, 5], [5, 5], [0, 5], [0, 0]], [[1, 1], [4, 1], [4, 4], [1, 4], [1, 1]]
@netmilk
netmilk / embed-environments.apib
Created November 23, 2016 13:57
Embed environments configuration
# Data Structures
## Environments (array)
### Items
- (Environment)
## Environment
- label (optional)- The label to be rendered in the Machine colunm in the examples and in the console