We use cookies (just for analytics) on this website. If you continue we will assume you are happy with it. ok

BeBanjo

Back to index

Contributor

Note: Only Movida accounts with this feature enabled will expose this API.

The contributor resource represents any individual that takes part in the production of a piece of audiovisual content. E.g. actors, directors, producers, camera staff, etc.

It can be linked to a title, title group or brand via a credit resource.

This is how a Contributor resource looks in the API:

<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  <id type="integer">1</id>
  <first-name>Jackie</first-name>
  <last-name>Chan</last-name>
  <external-id>SAMPLE_ID</external-id>
  <biography>Let's keep this short</biography>
  <tags>actors, trending, martial</tags>
  <link rel="self" href="https://movida.bebanjo.net/api/contributors/1"/>
  <link rel="credits" href="https://movida.bebanjo.net/api/contributors/1/credits"/>
  <link rel="images" href="https://movida.bebanjo.net/api/contributors/1/images"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/contributors/1/metadata"/>
</contributor>

Valid attributes

  • id (required): Movida’s internal identifier for the contributor. It must not be supplied in the creation of the contributor, it will be set automatically.

  • first-name (required): the first name of the contributor

  • last-name (optional): the last name of the contributor.

  • external-id (optional): an identifier of the contributor in a external system. If provided, it has to be unique in the scope of the company.

  • biography (optional): a brief account of this contributor’s career.

  • tags (optional): a list of tags, separated by commas.

Getting a list of contributors

To return a (paginated) list of all the contributors in the account, you can send a GET request like the following:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/contributors
<?xml version="1.0" encoding="UTF-8"?>
<contributors type="array">
  <total-entries>174</total-entries>
  <link rel="next" href="https://staging-movida.bebanjo.net/api/contributors?page=2"/>
  <contributor>
    <id type="integer">1</id>
    <first-name>Jackie</first-name>
    <last-name>Chan</last-name>
    <external-id>SAMPLE_ID</external-id>
    <biography>Let's keep this short</biography>
    <tags>actors, trending, martial</tags>
    <link rel="self" href="https://movida.bebanjo.net/api/contributors/1"/>
    <link rel="credits" href="https://movida.bebanjo.net/api/contributors/1/credits"/>
    <link rel="images" href="https://movida.bebanjo.net/api/contributors/1/images"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/contributors/1/metadata"/>
  </contributor>
  <contributor>
    <id type="integer">2</id>
    <first-name>Stacie</first-name>
    <last-name>Chan</last-name>
    <external-id nil="true"/>
    <biography nil="true"/>
    <tags></tags>
    <link rel="self" href="https://movida.bebanjo.net/api/contributors/2"/>
    <link rel="credits" href="https://movida.bebanjo.net/api/contributors/2/credits"/>
    <link rel="images" href="https://movida.bebanjo.net/api/contributors/2/images"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/contributors/2/metadata"/>
  </contributor>
</contributors>

Note that this is a paginated resource. By default, only 50 contributors will be included in each page but you can override this default by using the per_page parameter described in the next section. The total-entries attribute will indicate the total number of entries and the links rel="next" and rel="prev" should be used to get the next and the previous pages.

Valid attributes

You can filter the list of contributors returned using the following attributes:

  • external_id: It will return only the contributor with that specific external id (if any).

  • full_name: It will return only the set of contributors whose name matches the query (if any).

  • per_page: Number of elements returned in each page. The maximum value allowed is 200 and the default is 50.

Getting a specific contributor

This operation allows you to recover information about one specific contributor.

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/contributor/1
<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  <id type="integer">1</id>
  <first-name>Jackie</first-name>
  <last-name>Chan</last-name>
  <external-id>SAMPLE_ID</external-id>
  <biography>Let's keep this short</biography>
  <tags>actors, trending, martial</tags>
  <link rel="self" href="https://movida.bebanjo.net/api/contributors/1"/>
  <link rel="credits" href="https://movida.bebanjo.net/api/contributors/1/credits"/>
  <link rel="images" href="https://movida.bebanjo.net/api/contributors/1/images"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/contributors/1/metadata"/>
</contributor>

Creating a new contributor

To create a contributor, you just need to POST a proper XML representation of a contributor, similar to what you get when fetching one, to the proper endpoint.

For example, this POST would create an contributor (we’ll use curl’s @ option, which reads the data that is to be posted to the URL from a file):

cat contributor.xml
<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  <first-name>Clint</first-name>
  <last-name>Eastwood</last-name>
  <external-id>clint_ID</external-id>
  <biography>Actor, director, what a superstar</biography>
  <tags>best actors, best directors</tags>
</contributor>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @contributor.xml "https://movida.bebanjo.net/api/contributors"

Movida will return the full XML of the contributor just created:

<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  <id type="integer">3</id>
  <first-name>Clint</first-name>
  <last-name>Eastwood</last-name>
  <external-id>clint_ID</external-id>
  <biography>Actor, director, what a superstar</biography>
  <tags>best actors, best directors</tags>
  <link rel="self" href="https://movida.bebanjo.net/api/contributors/3"/>
  <link rel="credits" href="https://movida.bebanjo.net/api/contributors/3/credits"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/contributors/3/metadata"/>
  <link rel="images" href="https://movida.bebanjo.net/api/contributors/3/images"/>  
</contributor>

Dealing with names

If instead of the first-name and last-name you just have one single piece, the full name, don’t worry, we have a solution for you! Just send a full-name node, and we’ll do the magic behind the scenes for you.

cat contributor_with_full_name.xml
<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  <full-name>Clint Eastwood</full-name>
</contributor>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @contributor_with_full_name.xml "https://movida.bebanjo.net/api/contributors"

As you can see, we try to do our best to separate the full name into pieces:

<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  ...
  <first-name>Clint</first-name>
  <last-name>Eastwood</last-name>
  ...
</contributor>

Updating a contributor

As our introduction to REST APIs guide page suggests, you can update a contributor just by issuing a PUT request to each contributor URI. You only need to include those attributes that you wish to update:

cat contributor_update.xml
<contributor>
  <biography>
    Perhaps the icon of macho movie stars, Clint Eastwood has become a standard in international cinema...
  </biography>
</contributor>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X PUT -d @contributor_update.xml "https://movida.bebanjo.net/api/contributor/3"

As always, Movida will return the full XML of the resource just updated:

<?xml version="1.0" encoding="UTF-8"?>
<contributor>
  <id type="integer">3</id>
  <first-name>Clint</first-name>
  <last-name>Eastwood</last-name>
  <external-id>clint_ID</external-id>
  <biography>
    Perhaps the icon of macho movie stars, Clint Eastwood has become a standard in international cinema...
  </biography>
  <tags>best actors, best directors</tags>
  <link rel="self" href="https://movida.bebanjo.net/api/contributors/3"/>
  <link rel="credits" href="https://movida.bebanjo.net/api/contributors/3/credits"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/contributors/3/metadata"/>
  <link rel="images" href="https://movida.bebanjo.net/api/contributors/3/images"/>
</contributor>

Deleting a contributor

You can also delete a contributor by sending a DELETE request to each contributor URI:

$ curl --digest -u robot_user:password -X DELETE "https://movida.bebanjo.net/api/contributors/3"

Take into account that all the credits of the contributor, if any, will be deleted too.

Metadata and images

A contributor can have its own metadata and images. Which behaves exactly as in other resources like for instance titles, title group, or brands.

Last updated October 10th, 2017.