I cannot see anything in the API docs (which appear to only provide 2
functions? search and schedule?) to get a list of the available
channels?
I found there was a channels.json which will return a list of
channels, though its not complete and also the id's used do not match
those required for the schedule search?
I have seen that the atlas code appears to have a load of channel ids
hardcoded into it, but I would have thought there was an API for
getting the current list for a set of publishers? I'm probably just
missing something obvious.
> I cannot see anything in the API docs (which appear to only provide 2 > functions? search and schedule?) to get a list of the available > channels?
> I found there was a channels.json which will return a list of > channels, though its not complete and also the id's used do not match > those required for the schedule search?
> I have seen that the atlas code appears to have a load of channel ids > hardcoded into it, but I would have thought there was an API for > getting the current list for a set of publishers? I'm probably just > missing something obvious.
Hi Adam,
Well done for finding the channels endpoint! This is a new endpoint we've recently added and not yet updated the documentation for. We're currently transitioning from a static list of channels to a more configuration-driven approach and haven't yet moved clients over to the new IDs, hence you're seeing that the IDs on the channels endpoint do not line up with the schedule endpoint. Also, the reason you're not seeing all channels on the channels endpoint is because the results are paginated. You can use the limit and offset parameters to control the results.
If you're using the Atlas Java client then you can use the channels as described in the org.atlasapi.media.entity.Channel class. This will be changing in the near future, and we'll be announcing on the list how people need to change their use of the Atlas client. If you're not using the Atlas client then let me know and we can provide you with a list of the channels and IDs until the schedule endpoint is moved to using the new IDs you see on the channels endpoint.
Finally, we've some other new features around channels that we'll also be announcing very soon, which will further assist in not having to maintain lists of channels in your client code.
no I'm not using the java client, I'm writing it in python from scratch. If the java client contains the current list and its not yet accessible through the API (with correct channel id mappings) I'm guessing I can just get the list from there for now.
Presumably the the class you mentioned, atlas-model/src/main/java/org/atlasapi/media/entity/Channel.java is what I should strip the ids from?
I'll look out for the new features.
Adam
On 27 January 2012 22:13, Tom McAdam <t...@metabroadcast.com> wrote:
> > I cannot see anything in the API docs (which appear to only provide 2 > > functions? search and schedule?) to get a list of the available > > channels?
> > I found there was a channels.json which will return a list of > > channels, though its not complete and also the id's used do not match > > those required for the schedule search?
> > I have seen that the atlas code appears to have a load of channel ids > > hardcoded into it, but I would have thought there was an API for > > getting the current list for a set of publishers? I'm probably just > > missing something obvious.
> Hi Adam,
> Well done for finding the channels endpoint! This is a new endpoint we've > recently added and not yet updated the documentation for. We're currently > transitioning from a static list of channels to a more configuration-driven > approach and haven't yet moved clients over to the new IDs, hence you're > seeing that the IDs on the channels endpoint do not line up with the > schedule endpoint. Also, the reason you're not seeing all channels on the > channels endpoint is because the results are paginated. You can use the > limit and offset parameters to control the results.
> If you're using the Atlas Java client then you can use the channels as > described in the org.atlasapi.media.entity.Channel class. This will be > changing in the near future, and we'll be announcing on the list how people > need to change their use of the Atlas client. If you're not using the Atlas > client then let me know and we can provide you with a list of the channels > and IDs until the schedule endpoint is moved to using the new IDs you see > on the channels endpoint.
> Finally, we've some other new features around channels that we'll also be > announcing very soon, which will further assist in not having to maintain > lists of channels in your client code.