Query returns results when it should not - gracenote

I'm trying to work with the GraceNote web API and I'm getting unexpected results. For example, when I run a query to get the track info for Green Day/Dookie/She I get everything I'm asking for, yet if I change the album_title to AMERICAN IDIOT, I still get a response saying that 24 tracks were found and my track is #21, while there is no song titled "she" on American Idiot (so nothing should be returned). Here's a copy of my query:
<QUERIES>
<LANG>eng</LANG>
<AUTH>
<CLIENT>MyClientID</CLIENT>
<USER>MyUserID</USER>
</AUTH>
<QUERY CMD="ALBUM_SEARCH">
<MODE>SINGLE_BEST_COVER</MODE>
<TEXT TYPE="ARTIST">green day</TEXT>
<TEXT TYPE="ALBUM_TITLE">american idiot</TEXT>
<TEXT TYPE="TRACK_TITLE">she</TEXT>
<RANGE>
<START>1</START>
<END>1</END>
</RANGE>
<OPTION>
<PARAMETER>SELECT_EXTENDED</PARAMETER>
<VALUE>COVER,LINK,ARTIST_BIOGRAPHY</VALUE>
</OPTION>
<OPTION>
<PARAMETER>COVER_SIZE</PARAMETER>
<VALUE>THUMBNAIL</VALUE>
</OPTION>
</QUERY>
</QUERIES>
Can someone please explain why I get a result?
I'm experiencing other anomalies as well, but I'll post them as separate questions.

The Gracenote database is really comprehensive, and contains almost every CD ever made in the world. What you've stumbled upon is probably a "gray market" compilation CD, which contains all of American Idiot, plus a bunch of B-sides and other hits. From our stats, it's actually a fairly popular compilation in certain countries, though I can't find any links to that product online.
If you do an ALBUM_FETCH on the Album GN_ID you got from your ALBUM_SEARCH, you can see the list of all 24 tracks on this CD.
<QUERIES>
<LANG>eng</LANG>
<AUTH>
<CLIENT>YourClientID</CLIENT>
<USER>YourUserID</USER>
</AUTH>
<QUERY CMD="ALBUM_FETCH">
<GN_ID>72313663-EEE803E4BAB5BE208EA8278B77321863</GN_ID>
</QUERY>
</QUERIES>
If you do your original query without the ALBUM_TITLE field, you will get the correct version of "She" on "Dookie".

Related

How to get the list of bag options from a journey without recordlocator

We need to see if Ryan Air makes available the cabin bag option before booking.
Therefore what is the action verb we can use to get this list with flight information (itinerary, segment) ?
Thanks :)
Kind regards
It called "BrandedFares" attribute on the Sabre side. With BrandedFares option enabled, you get 1 basic price with its extra prices (cabin bag, meal, etc.).
If you're using BargainFinderMax operation to search and get flights, you have to set BrandedFareIndicators attribute as true, like this:
<TravelerInfoSummary>
<PriceRequestInformation>
<TPA_Extensions>
<BrandedFareIndicators MultipleBrandedFares="true"/>
</TPA_Extensions>
</PriceRequestInformation>
</TravelerInfoSummary>
And also, your PCC also have to be available and has access to get BrandedFares, you need to discuss it with your Sabre consultant.
Regards.

Wordpress: how to extract a log time (serialized data)

I have this log on a Wordpress database (wp_postmeta, if it's relevant), which is the inputs sent via a webform and that I receive as e-mail. This is serialized as follows.
s:859:"a:11:{s:10:"Producent*";a:1:{i:0;s:4:"Test";}s:8:"Adresse*";a:1:{i:0;s:4:"Test";}s:7:"Postnr*";a:1:{i:0;s:4:"1111";}s:3:"By*";a:1:{i:0;s:4:"Test";}s:8:"Telefon*";a:1:{i:0;s:8:"12345678";}s:7:"E-mail*";a:1:{i:0;s:12:"test#test.dk";}s:14:"Kontaktperson*";a:1:{i:0;s:3:"LOC";}s:13:"Bemærkninger";a:1:{i:0;s:2:"Yo";}s:9:"_log_time";a:1:{i:0;i:1453898700;}s:12:"_log_form_id";s:4:"1939";s:10:"_log_mails";a:1:{s:7:"Webform";s:247:"<p>Ny besked fra *URL* </p>
<p>Producent<br />
Test</p>
<p>Adresse<br />
Test</p>
<p>Postnr<br />
1111</p>
<p>By<br />Test</p>
<p>Telefon<br />
12345678</p>
<p>E-mail<br />test#test.dk</p>
<p>Kontaktperson<br />
LOC</p>
<p>Bemærkninger<br />
Yo</p>
<p> </p>
";}}";
My question is if I can extract a log time from s:9:"_log_time";a:1:{i:0;i:1453898700;} in the form of dd/mm/yyyy hh:mm or something to that effect? If not:
(1) How can I do that from this data (there's no other data saved)?
(2) What is this _log_time supposed to be?
Many thanks in advance for helping us newbies learn more!
PS: if this question has already been posted somewhere, please point me to the right direction, as my Google search and search here has given me nothing useful.
Running a:1:{i:0;i:1453898700;} through unserialize() results in:
array (
0 => 1453898700,
)
(Well, we could've guessed that from just looking at the serialized data.)
Using PHP's date function, we find out this particular Unix timestamp (i.e. 1453898700) is equivalent to Wednesday, 27-Jan-16 12:45:00 UTC.
What that date/time is supposed to mean, exactly, I can't help you with. The time the form data was submitted?

How can reserve Air Seats for all segments in a given PNR?

I am planning to use the <AirSeatRQ> request using Sabre's SOAP API, but according to the documentation, you have to request a seat assignment for each passenger on each segment with the user's preference.
Something like this according to the example on Dev Studio:
<AirSeatRQ ReturnHostCommand="false" TimeStamp="2011-10-27T15:30:00-06:00" Version="2.0.0">
<!--Repeat Factor=0-->
<Seats>
<Seat BoardingPass="true" ChangeOfGauge="true" NameNumber="1.1" Number="21A" Preference="AN" SegmentNumber="1"/>
</Seats>
</AirSeatRQ>
Also, according to the request documentation, the repeat factor for the <Seats> request is zero. Does that mean that if I want to assign seats for all passengers on all segments do I have to send several requests?
Ideally, I would like to have the seats for all passengers in all segments automatically assigned after reading the PNR. Is that possible through Web Services?
Checking the <PassengerDetailsRQ> XML Schema definition, an <AirSeatRQ> can be sent along. I guess you can perform a standalone <AirSeatRQ> request, but bundling it with the passenger details is easier and save us from making extra requests to Sabre's API.
You have to send a <Seat\> request for each passenger in each segment of the itinerary. This is a working example I did for a two legs itinerary, each leg consisting of two segments for two adults:
I'm omitting most of the passenger details properties and focusing on the AirSeat element:
<PassengerDetailsRQ Version="2.3.0">
<PriceQuoteInfo HaltOnError="true"></PriceQuoteInfo>
<SpecialReqDetails>
<AddRemarkRQ>
<RemarkInfo>
<Remark Code="H" Type="General">
<Text>THANK YOU FOR BOOKING MAURICIO CUENCA AIRLINES</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
<AirSeatRQ>
<Seats>
<Seat NameNumber="1.1" Preference="AN" SegmentNumber="1"/>
<Seat NameNumber="1.2" Preference="AN" SegmentNumber="2"/>
<Seat NameNumber="1.1" Preference="AN" SegmentNumber="3"/>
<Seat NameNumber="1.2" Preference="AN" SegmentNumber="4"/>
</Seats>
</AirSeatRQ>
<SpecialServiceRQ HaltOnError="true">
<SpecialServiceInfo></SpecialServiceInfo>
</SpecialServiceRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ HaltOnError="true">
<AgencyInfo></AgencyInfo>
<CustomerInfo></CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
This way, right after the PNR is created, all seats for all passengers in every segment are already assigned and there is no need for further requests asking for seat assignments.
that seems to be the case.
Testing multiple <Seat> elements inside <Seats> returns a schema validation error. Same when using multiple <Seats> elements.
Looks like the only option right now is to send multiple requests, one for each passenger on each segment.

Gracenote API: List of Genres

Is there a way to retrieve all "genre" field list? I've seen it was the case for contribution/production types: I'm using Gracenote web api.
I've also noticed that "IPGCategorie" L1/L2 values looks a lot like "Genre" field values... Is there a relation between them?
EDIT: Sorry for not pointing this before, but i'm talking about the Movie/Video API
I think you should first refer to the 'eyeQ Web API reference' document found in the following page: https://developer.gracenote.com/eyeq.
Starting from 'FIELDVALUES' section in page 17, it has the exact information you are looking for.
There are L1 and L2 IPGCATEGORY values.
The following is a sample query taken from the document.
<QUERIES>
<AUTH>
<CLIENT>client_id_string</CLIENT>
<USER>user_id_string</USER>
</AUTH>
<LANG>eng</LANG>
<QUERY CMD="FIELDVALUES">
<FIELDNAME>IPGCATEGORY_L1</FIELDNAME>
<MEDIASPACE>VIDEO</MEDIASPACE>
</QUERY>
</QUERIES>
To get the list of genres (or moods, or eras) you need to make a call to the "fieldvalues" API, you can see how to do it here:
https://developer.gracenote.com/rhythm-api#attribute-station
This call will give you the list of supported genres:
https://cXXXXXXX.web.cddbp.net/webapi/json/1.0/radio/fieldvalues?fieldname=RADIOGENRE&client=CLIENT_ID&user=USER_ID
You can then use the returned ID's with pygn.createRadio()

URL_GET and TVCHANNEL_IMAGE: No longer returning matches

I am using Gracenote video services for the programming guide in my application. Within the guide, I display channel logos along with the channel name and number. In the past, I have retrieved channel logo URLs by using the URL_GET API query with the mode set to TVCHANNEL_IMAGE. Within the body of the query, I would include the Gracenote IDs for a set of channels (found in a TVCHANNEL_LOOKUP response). Below is an example query.
<QUERIES>
<AUTH>
<CLIENT>XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CLIENT>
<USER>XXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</USER>
</AUTH>
<QUERY CMD="URL_GET">
<MODE>TVCHANNEL_IMAGE</MODE>
<GN_ID>251535939-B76CB793D827E8BE713DAEB9675ADED4</GN_ID>
<GN_ID>251539612-E293EAF3F3164B292AD102532BCB9AF9</GN_ID>
</QUERY>
</QUERIES>
The response to the query would return URLs that I could then download the logos from. This was working fine up until one week ago. Now, the response returns with no match.
<RESPONSES>
<RESPONSE STATUS="NO_MATCH">
</RESPONSE>
</RESPONSES>
Has the API for retrieving channel logos changed? If so, how and what is the new method for getting channel logos? Ideally, I would like to continue downloading logos on demand through an API similar to URL_GET.
Are you still able to reproduce this? I get a valid response back using your query example
<RESPONSES>
<RESPONSE STATUS="OK">
<TVCHANNEL>
<GN_ID>251535939-B76CB793D827E8BE713DAEB9675ADED4</GN_ID>
<URL TYPE="IMAGE" SIZE="110" WIDTH="67" HEIGHT="50">http://akamai-b.cdn.cddbp.net/cds/2.0/image/E9F4/7FE7/D525/9746_110.png</URL>
</TVCHANNEL>
<TVCHANNEL>
<GN_ID>251539612-E293EAF3F3164B292AD102532BCB9AF9</GN_ID>
<URL TYPE="IMAGE" SIZE="110" WIDTH="67" HEIGHT="50">http://akamai-b.cdn.cddbp.net/cds/2.0/image/F1D1/F628/A3FE/79E0_110.png</URL>
</TVCHANNEL>
</RESPONSE>
</RESPONSES>

Resources