Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"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