Skip to content

Instantly share code, notes, and snippets.

@dfanchon
Last active August 7, 2017 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfanchon/a1d6f1a358767008797de8ab2b4e51d3 to your computer and use it in GitHub Desktop.
Save dfanchon/a1d6f1a358767008797de8ab2b4e51d3 to your computer and use it in GitHub Desktop.
{
"content": {
"name": "content",
"description": "The Guardian API content",
"fields": {
"id": {
"type": "String",
"required": true,
"description": "Content ID"
},
"webTitle": {
"type": "String",
"required": true,
"description": "WebTitle"
},
"fields": {
"type": "field",
"description": "Fields"
},
"tags": {
"type": "tag",
"description": "Tags",
"multivalued": true
},
"sectionId": {
"type": "String",
"description": "Section ID"
},
"sectionName": {
"type": "String",
"description": "Section Name"
}
},
"expose": true,
"multiEndpoint": {
"name": "contents",
"args": {
"q": {
"type": "String"
},
"section": {
"type": "String"
},
"tag": {
"type": "String"
}
}
},
"singleEndpoint": {
"name": "content",
"args": {
"ids": {
"type": "String",
"required": true,
"modelField": "id",
"description": "Content ID"
}
}
},
"connector": {
"type": "guardian",
"configs": {
"segment": "search",
"resultsPath": "response.results",
"detailResultsPath": "response.results.0",
"startFieldName": "page",
"limitFieldName": "page-size",
"orderByFieldName": "order-by"
}
}
},
"field": {
"name": "field",
"description": "Embedded Field",
"fields": {
"headline": {
"type": "ID",
"required": true
},
"body": {
"type": "HTML"
},
"thumbnail": {
"type": "ImageURL"
},
"lastModified": {
"type": "String"
}
}
},
"tag": {
"name": "tag",
"description": "Embedded Tag List",
"fields": {
"id": {
"type": "ID",
"required": true
},
"webTitle": {
"type": "String"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment