NAV

CallingAllPapers

php

Introduction

Welcome to the API powering callingallpapers.com! You can use this API to access Call for Paper (CfP) endpoints to get information on currently open CfPs.

We currently have examples for language bindings in PHP but you can consume this API with any language you like. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

To authorize, use this code:

$client = new GuzzleHttp\Client(['header' = [
    'Authorization' => 'Bearer myVeryOwnApiKey',
]]);

Make sure to replace myVeryOwnApiKey with your API key.

Callingallpapers uses API keys to allow write access to the API. You can request your Callingallpapers-API key by sending an Email to apikeyrequest@callingallpapers.com together with a short description what you’d like to do with it.

Callingallpapers expects for the API key to be included in all API requests to the server (except GET) in a header that looks like the following:

Authorization: myVeryOnwApiKey

Output formats

$client = new GuzzleHttp\Client([
    'Accept' => 'text/calendar',
]]);
$result = $client->request('get', 'https://api.callingallpapers.com/v1/cfp');
// Handle iCal file

The following output formats are available and can be specified with an Accept request header:

If an Accept header is not specified it will default to application/json

Calls for Papers

Get All Calls for Papers

$client = new GuzzleHttp\Client();
$result = $client->request('get', 'https://api.callingallpapers.com/v1/cfp');

The above command returns JSON structured like this:

{
  "cfps" : [
    {
      "_rel": {
        "cfp_uri": "v1/cfp/da39a3ee5e6b4b0d3255bfef95601890afd80709"
      },
      "dateCfpEnd": "2016-01-02T13:24:35+02:00",
      "dateCfpStart": "2016-01-01T12:13:14+02:00",
      "dateEventEnd": "2016-11-30T00:00:00+00:00",
      "dateEventStart": "2016-11-30T00:00:00+00:00",
      "description": null,
      "eventUri": null,
      "iconUri": null,
      "lastChange": "2016-02-18T12:00:00+00:00",
      "latitude": null,
      "location": null,
      "longitude": null,
      "name": "foo",
      "tags": [
        ""
      ],
      "timezone": "Europe/Berlin",
      "uri": "http://example.com"
    }
  ],
  "meta" : {
    "count" : 1
  }
}

This endpoint retrieves all CfPs.

HTTP Request

GET https://api.callingallpapers.com/v1/cfp

Content-Types

This endpoint can return differntly prepared data for different Content-Types.

MIME-Type Content
application/json (default) JSON-Data as described
application/rss+xml RSS-Feed for the currently open CfPs
text/calendar iCalendar-File for subscription in your calendaring-application
text/html HTML-Representation

Query Parameters

Not yet implemented!

Get a Specific CfP

$client = new GuzzleHttp\Client(['header' = [
    'Authorization' => 'Bearer myVeryOwnApiKey',
]]);
$result = $client->request('get', 'https://api.callingallpapers.com/v1/cfp/<HASH>');

The above command returns JSON structured like this:

{
  "cfps" : [
    {
      "_rel": {
        "cfp_uri": "v1/cfp/<HASH>"
      },
      "dateCfpEnd": "2016-01-02T13:24:35+02:00",
      "dateCfpStart": "2016-01-01T12:13:14+02:00",
      "dateEventEnd": "-001-11-30T00:00:00+00:00",
      "dateEventStart": "-001-11-30T00:00:00+00:00",
      "description": null,
      "eventUri": null,
      "iconUri": null,
      "lastChange": "2016-02-18T12:00:00+00:00",
      "latitude": null,
      "location": null,
      "longitude": null,
      "name": "foo",
      "tags": [
        ""
      ],
      "timezone": "Europe/Berlin",
      "uri": "http://example.com"
    }
  ],
  "meta" : {
    "count" : 1
  }
}

This endpoint retrieves a specific CfP. The CfP is identified by a hash which is the sha1-sum of the URI of the event that opened the CfP.

Create a new CfP

$client = new GuzzleHttp\Client(['header' = [
    'Authorization' => 'Bearer myVeryOwnApiKey',
]]);
$result = $client->request('POST', 'https://api.callingallpapers.com/v1/cfp/', [
    'form_params' => <POST-Parameters>
]]);

The above command returns a Location Header with the URL of the newly created resource

HTTP Request

POST https://api.callingallpapers.com/v1/cfp

POST Parameters

Parameter Required Description
dateCfpEnd * The date the CfP ends. This needs to be a date that can be parsed by php’s datefunction
dateCfpStart * The date the CfP starts. This needs to be a date that can be parsed by php’s datefunction
dateEventEnd The date the Event ends. This needs to be a date that can be parsed by php’s datefunction
dateEventStart The date the Event starts. This needs to be a date that can be parsed by php’s datefunction
description A description of the Conference
eventUri * The URI of the events homepage
iconUri an URI where we can find an icon for the conference. squared is prefered ;)
latitude The latitude of the conference-venue
location The longitude of the conference-venue
longitude The name of the conference-venue
name * The name of the conference
tags A comma-separated list of tags for the event
timezone A timezone name. All dates are assumed to be in that timezone. If no timezone is given “UTC” is assumed
uri * the URI of the CfP

Update an existing CfP

$client = new GuzzleHttp\Client(['header' = [
    'Authorization' => 'Bearer myVeryOwnApiKey',
]]);
$result = $client->request('PUT', 'https://api.callingallpapers.com/v1/cfp/<HASH>', [
    'form_params' => <PUT-Parameters>
]]);

The above command returns a Location Header with the URL of the newly created resource

HTTP Request

PUT https://api.callingallpapers.com/v1/cfp/<HASH>

PUT Parameters

Parameter Required Description
dateCfpEnd * The date the CfP ends. This needs to be a date that can be parsed by php’s datefunction
dateCfpStart * The date the CfP starts. This needs to be a date that can be parsed by php’s datefunction
dateEventEnd The date the Event ends. This needs to be a date that can be parsed by php’s datefunction
dateEventStart The date the Event starts. This needs to be a date that can be parsed by php’s datefunction
description A description of the Conference
eventUri * The URI of the events homepage
iconUri an URI where we can find an icon for the conference. squared is prefered ;)
latitude The latitude of the conference-venue
location The longitude of the conference-venue
longitude The name of the conference-venue
name * The name of the conference
tags A comma-separated list of tags for the event
timezone A timezone name. All dates are assumed to be in that timezone. If no timezone is given “UTC” is assumed
uri * the URI of the CfP

Errors

The API uses the following error codes:

Error Code Meaning
400 Bad Request – There was a problem with your request
401 Unauthorized – Authentication failed. See the WWW-Authenticate response header for details
403 Forbidden – The requested resource is not allowed
404 Not Found – The specified CfP could not be found
405 Method Not Allowed – You tried to access an endpoint with an invalid method
406 Not Acceptable – You requested a format that isn’t supported
410 Gone – The CfP requested has been removed from our servers
429 Too Many Requests – You’re requesting too many CfPs! Slow down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintenance. Please try again later.
php