On 27 Jan 2012, at 10:02, Adam Sutton 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
> 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.
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.