2014-02-11 17:39:36 +00:00
|
|
|
{
|
|
|
|
"apiVersion": null,
|
|
|
|
"swaggerVersion": "1.2",
|
|
|
|
"basePath": "http://localhost:3333/api",
|
|
|
|
"resourcePath": "/campaigns/",
|
|
|
|
"produces": [
|
|
|
|
"application/json",
|
|
|
|
"text/plain"
|
|
|
|
],
|
|
|
|
"apis": [
|
|
|
|
{
|
|
|
|
"path": "/campaigns/",
|
|
|
|
"operations": [
|
|
|
|
{
|
|
|
|
"method": "GET",
|
|
|
|
"summary": "Returns all campaigns for the given user",
|
|
|
|
"notes": "Requires an API key.",
|
|
|
|
"responseClass": "List[Campaign]",
|
|
|
|
"nickname" : "getCampaigns",
|
|
|
|
"produces": [
|
|
|
|
"application/json",
|
|
|
|
"text/plain"
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid API Key"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "API Key not set"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"deprecated": "false"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"method": "POST",
|
2014-02-11 23:32:29 +00:00
|
|
|
"summary": "Create campaign",
|
2014-02-11 17:39:36 +00:00
|
|
|
"notes": "Requires an API key.",
|
|
|
|
"responseClass": "Campaign",
|
|
|
|
"nickname" : "addCampaigns",
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "body",
|
|
|
|
"description": "Campaign object that needs to be updated in the store",
|
|
|
|
"required": true,
|
|
|
|
"allowMultiple": false,
|
|
|
|
"dataType": "Campaign",
|
|
|
|
"paramType": "body"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid API Key"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"deprecated": "false"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"path": "/campaigns/{campaignId}",
|
|
|
|
"operations": [
|
|
|
|
{
|
2014-02-11 23:32:29 +00:00
|
|
|
"method": "GET",
|
|
|
|
"summary": "Find campaign by ID",
|
|
|
|
"notes": "Returns a campaign based on ID",
|
|
|
|
"responseClass": "Campaign",
|
|
|
|
"nickname": "getCampaignById",
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2014-02-11 17:39:36 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "campaignId",
|
2014-02-11 23:32:29 +00:00
|
|
|
"description": "ID of campaign that needs to be fetched",
|
2014-02-11 17:39:36 +00:00
|
|
|
"required": true,
|
|
|
|
"allowMultiple": false,
|
|
|
|
"dataType": "int64",
|
|
|
|
"paramType": "path"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid API Key"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "API Key not set"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid campaign id"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 404,
|
|
|
|
"message": "Campaign not found"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2014-02-11 23:32:29 +00:00
|
|
|
"method": "DELETE",
|
|
|
|
"summary": "Delete campaign",
|
|
|
|
"notes": "Requires an API Key",
|
|
|
|
"responseClass": "void",
|
|
|
|
"nickname": "deleteCampaign",
|
2014-02-11 17:39:36 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "campaignId",
|
2014-02-11 23:32:29 +00:00
|
|
|
"description": "Campaign id to delete",
|
2014-02-11 17:39:36 +00:00
|
|
|
"required": true,
|
|
|
|
"allowMultiple": false,
|
|
|
|
"dataType": "int64",
|
|
|
|
"paramType": "path"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid API Key"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "API Key not set"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid campaign id"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 404,
|
|
|
|
"message": "Campaign not found"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"models": {
|
|
|
|
"Result": {
|
|
|
|
"id": "Result",
|
|
|
|
"properties": {
|
|
|
|
"target": {
|
|
|
|
"$ref": "Target"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Target": {
|
|
|
|
"id": "Target",
|
|
|
|
"properties": {
|
|
|
|
"email": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Campaign": {
|
|
|
|
"id": "Campaign",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"results": {
|
|
|
|
"type" : "array",
|
|
|
|
"items" : {
|
|
|
|
"$ref" : "Result"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Group": {
|
|
|
|
"id": "Group",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"targets": {
|
|
|
|
"type" : "array",
|
|
|
|
"items" : {
|
|
|
|
"$ref" : "Target"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"modified_date": {
|
|
|
|
"type" : "date"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Pet": {
|
|
|
|
"id": "Pet",
|
|
|
|
"description": "A pet is a person's best friend",
|
|
|
|
"required": [
|
|
|
|
"name",
|
|
|
|
"id"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"tags": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "Tag"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"photoUrls": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "pet status in the store",
|
|
|
|
"enum": [
|
|
|
|
"available",
|
|
|
|
"pending",
|
|
|
|
"sold"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"category": {
|
|
|
|
"$ref": "Category"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Category": {
|
|
|
|
"id": "Category",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|