\Copilot\ClientCopilotClient

This is the base class for usage by 3rd party developers.

This class provides methods to retrieve all public information from a co*pilot installation. This ranges from artists to events (and concerts) to newsfeed and newsletter subscription.

The client is constructed by providing the baseurl to the copilot installation the client should talk with. For information on the base url please contact us at support@copilot-office.de

Summary

Methods
Properties
Constants
__construct()
getAgencyArtists()
getExternalArtists()
getArtistById()
getVideos()
getFutureEvents()
getAllEvents()
getEventsFrom()
getEventById()
getAllConcerts()
getConcertsFrom()
getConcertById()
getNews()
getNewsByArtist()
getNewsById()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $baseurl) 

Creates a new client for the given base url

Parameters

string $baseurl

The URL the client will retrieve it's information from

getAgencyArtists()

getAgencyArtists(\Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\Artist>

Returns all artists that are managed by the agency

Parameters

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\Artist> —

Array of artists managed by the agency

getExternalArtists()

getExternalArtists(\Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\Artist>

Returns all artists that are not managed by the agency (artists booked for concerts)

Parameters

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\Artist> —

Array of artists not managed by the agency

getArtistById()

getArtistById(string  $id) : \Copilot\Client\Artist

Returns a artists details for the given id

Parameters

string $id

The id of the artist

Returns

\Copilot\Client\Artist

The artist to be returned

getVideos()

getVideos(\Copilot\Client\Artist  $artist) : array<mixed,\Copilot\Client\Video>

Returns all videos for the given artist

Parameters

\Copilot\Client\Artist $artist

The artist

Returns

array<mixed,\Copilot\Client\Video> —

Array of videos for the given artist. Might be empty but never NULL

getFutureEvents()

getFutureEvents(\Copilot\Client\Artist  $artist, \Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\Event>

Returns an array of all upcoming events for the given artist

Parameters

\Copilot\Client\Artist $artist

The artist for whom to retrieve future events

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\Event> —

The event for the given artist

getAllEvents()

getAllEvents(\Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\Event>

Returns all events from the past until the future

Parameters

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\Event> —

All events from the past to the future

getEventsFrom()

getEventsFrom(string  $from, \Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\Event>

Returns all events from the given date

Parameters

string $from

The date in format "Y-m-d"

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\Event> —

The events in the given timerange

getEventById()

getEventById(string  $id) : \Copilot\Client\Event

Returns a single event by it's id

Parameters

string $id

The id of the event to be retrieved

Returns

\Copilot\Client\Event

The event

getAllConcerts()

getAllConcerts(\Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\Event>

Returns all concerts from the past to the future (use with care!)

Parameters

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\Event> —

The events

getConcertsFrom()

getConcertsFrom(string  $from, \Copilot\Client\Page  $page) : \Copilot\Client\Event[]:

Returns all concerts from a certain point in time to the future

Parameters

string $from

The date in the format "Y-m-d"

\Copilot\Client\Page $page

The page object to be used

Returns

\Copilot\Client\Event[]:

getConcertById()

getConcertById(string  $id) : \Copilot\Client\Event

Returns the concert for the given id

Parameters

string $id

The id of the concert to be retrieved

Returns

\Copilot\Client\Event

getNews()

getNews(string  $channels = NULL, \Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\News>

Returns the news for the given channels or all news if no channels are specified

Parameters

string $channels

The channels to fetch news from

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\News> —

Array of news entries

getNewsByArtist()

getNewsByArtist(\Copilot\Client\Artist  $artist, \Copilot\Client\Page  $page = NULL) : array<mixed,\Copilot\Client\News>

Returns all news for the given artist

Parameters

\Copilot\Client\Artist $artist

The artist to return news for

\Copilot\Client\Page $page

The page object to be used

Returns

array<mixed,\Copilot\Client\News> —

The page of news for the given artist. Might be empty.

getNewsById()

getNewsById(string  $id) : \Copilot\Client\News

Returns the news article for the given id

Parameters

string $id

The id of the news article

Returns

\Copilot\Client\News

The news article