Gracenote eyeQ GNIDs changed over time - gracenote

On August 6th, I made a TVGRID_LOOKUP request with the gracenote eyeQ API.
The response returned an Episode of "The Big Bang Theory - The Zazzy Substitution" (airing-time 21:45).
The TVPROGRAM GNID was 442470733-5294AFF66A2B66D6CF9368BCE777839F.
Today I made the same request and got a different GNID (445129959-C521A678BE53213977744678C90B202C).
What happend? I thought GNIDs are unique?
Just in case, here's my request:
<?xml version="1.0"?>
<QUERIES>
<AUTH>
<CLIENT>__CLIENT_ID__</CLIENT>
<USER>__USER_ID__</USER>
</AUTH>
<QUERY CMD="TVGRID_LOOKUP">
<TVCHANNEL>
<GN_ID>251533333-26F45A038CFBD8323F70D3944EB16008</GN_ID>
</TVCHANNEL>
<DATE TYPE="START">2014-08-11T20:00</DATE>
<DATE TYPE="END">2014-08-11T20:10</DATE>
</QUERY>
</QUERIES>

TVPROGRAM's are unique within the TVGRID, but are not guaranteed to be consistent from day to day. However, if you do a follow up query, you can get a unique GN_ID of the AV_WORK that represents the show/episode. For example:
<QUERIES>
<AUTH>
<CLIENT>_your_client_id_</CLIENT>
<USER>_your_user_id_</USER>
</AUTH>
<LANG>eng</LANG>
<COUNTRY>usa</COUNTRY>
<QUERY CMD="TVPROGRAM_FETCH">
<GN_ID>445129959-C521A678BE53213977744678C90B202C</GN_ID>
</QUERY>
</QUERIES>
Returns:
...
<AV_WORK>
<GN_ID>240234711-A3BEDE6BF00D48B35FAE5F0E66305B30</GN_ID>
</AV_WORK>
...
This AV_WORK GN_ID will be the same between the different TVPROGRAM GN_IDs you received.

Related

How to retrieve Itinerary remarks with GetReservationsRQ Api?

Running the command I¥ command returns:
2 AA1579X 16SEP 5 DFWORD HF1 0625 0846 /DCBA*SDAZXT /E
I have successfully sent a request using GetReservationRQ. Asking for the remarks sections but I am getting the result above which I would expect. (I assumed this is the right section and have tried Itinerary too, see below)
<GetReservationRQ version="1.1.0" xmlns="http://services.sabre.com/sp/updatereservation/v1_1">
<Profile>
<UniqueID id="......."/>
</Profile>
<SubjectAreas>
<SubjectArea>REMARKS</SubjectArea>
</SubjectAreas>
<ReturnOptions>
<ViewName>Default</ViewName>
<ResponseFormat>STL</ResponseFormat>
</ReturnOptions>
</GetReservationRQ>
Which returns 2 remarks as part of the response:
<Remarks>
<Remark id="44" index="1" type="HS">
<RemarkLines>
<RemarkLine>
<Text>POSSIBLE DUPE BOOKING. SEE PNR JZXWEI JBVFYC HUSTLM</Text>
</RemarkLine>
</RemarkLines>
</Remark>
<Remark id="45" index="2" type="HS">
<RemarkLines>
<RemarkLine>
<Text>POSSIBLE DUPE BOOKING. SEE PNR KDCFKD KQLLXF</Text>
</RemarkLine>
</RemarkLines>
</Remark>
</Remarks>
However as you can see they are not the same remark as when I run the command I¥. What am I doing wrong?
Here are links to the sabre documentation:
https://developer.sabre.com/docs/soap_apis/management/itinerary/Retrieve_Itinerary/help_doc?page=get-reservation-request-and-response-structure
Which says:
REMARKS Allows to display remark information (supported types: REG, HD, HS, CLIADR, DELADR, INVOICE, ITINERARY, INTERFACE, CODED_A, PRTONTKT, CORPORATE, FOP, QQ, FILLER, ITINSEGASSOC)

Here maps api for geocoder doesn't get the area shape for district

I used this Here Geocode API to get the area shapes for the district. However, there's no available shapes being returned on the API.
here is the link for the API
https://geocoder.ls.hereapi.com/6.2/geocode.xml?xnlp=CL_JSMv3.0.17.0&apiKey=<APIKEY>&searchtext=Cakung%20Barat%20Kel.%20Jakarta%2013910%20Indonesia&mode=retrieveAddresses&jsoncallback=H.service.jsonp.handleResponse(37)&gen=9&additionalData=IncludeShapeLevel,district
here is the response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:Search xmlns:ns2="http://www.navteq.com/lbsp/Search-Search/4">
<Response>
<MetaInfo>
<Timestamp>2021-07-28T10:09:26.934Z</Timestamp>
</MetaInfo>
<View xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:SearchResultsViewType">
<ViewId>0</ViewId>
<Result>
<Relevance>1.0</Relevance>
<MatchLevel>district</MatchLevel>
<MatchQuality>
<Country>1.0</Country>
<City>1.0</City>
<Subdistrict>1.0</Subdistrict>
<PostalCode>1.0</PostalCode>
</MatchQuality>
<Location>
<LocationId>NT_ezpLZJFGXsz2rWjEVeA2oD</LocationId>
<LocationType>area</LocationType>
<DisplayPosition>
<Latitude>-6.16492</Latitude>
<Longitude>106.93429</Longitude>
</DisplayPosition>
<NavigationPosition>
<Latitude>-6.16492</Latitude>
<Longitude>106.93429</Longitude>
</NavigationPosition>
<MapView>
<TopLeft>
<Latitude>-6.1516</Latitude>
<Longitude>106.92209</Longitude>
</TopLeft>
<BottomRight>
<Latitude>-6.19349</Latitude>
<Longitude>106.94349</Longitude>
</BottomRight>
</MapView>
<Address>
<Label>Cakung Barat Kel., Cakung, Jakarta, Indonesia</Label>
<Country>IDN</Country>
<County>DKI Jakarta</County>
<City>Jakarta</City>
<District>Cakung</District>
<Subdistrict>Cakung Barat Kel.</Subdistrict>
<PostalCode>13910</PostalCode>
<AdditionalData key="CountryName">Indonesia</AdditionalData>
<AdditionalData key="CountyName">DKI Jakarta</AdditionalData>
</Address>
</Location>
</Result>
</View>
</Response>
</ns2:Search>
it is working for city and other options. based from the documentation, district is included on valid shape levels
We have tried to reproduce the request but it was determined as the coverage range is not supportive to get district-level shape for Jakarta.
For Example,
Demo link: https://tcs.ext.here.com/examples/v3/admin_boundaries
Also, we have documentation information with regards to coverage range.
Link: https://developer.here.com/documentation/geocoder/dev_guide/topics/coverage-geocoder.html

ejabberd reports bad request/modify when attempting to delete user

I'm trying to delete user using ejabberd yet I'm receiving 400/modify bad-request error. The stanzas sent by Smack are by the spec [1] as far as I can tell; it also works fine with OpenFire.
Ejabberd runs in rroemhild/docker-ejabberd docker container version 17.03-1 (the latest available; for reasons why I am not using the processone container see [2]) with the config file being stock from there (sections removed; full copy at [3])
hosts:
- "xmppserver.com"
auth_method:
- internal
acl:
admin:
user:
- "admin": "xmppserver.com"
- "adminaccount": "xmppserver.com"
local:
user_regexp: ""
access:
(nothing of interest here)
modules:
mod_adhoc: {}
host_config:
"xmppserver.com":
domain_certfile: "/opt/ejabberd/ssl/xmppserver.com.pem"
(Yes, I will properly configure SSL once I verify it works for me)
First I confirm the user is authorised to issue admin commands:
SENT
<iq to='xmppserver.com' id='Ghtu9-15' type='get'>
<query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands'/>
</iq>
RECEIVED
<iq xml:lang='en' to='appserver#xmppserver.com/39058022031067483561501494598609310' from='xmppserver.com' type='result' id='Ghtu9-15'>
<query node='http://jabber.org/protocol/commands' xmlns='http://jabber.org/protocol/disco#items'>
...
<item node='http://jabber.org/protocol/admin#add-user' name='Add User' jid='xmppserver.com'/>
<item node='http://jabber.org/protocol/admin#delete-user' name='Delete User' jid='xmppserver.com'/>
...
</query>
</iq>
As you can see the delete-user command is listed as available. Then I proceed to delete a user:
SENT
<iq to='xmppserver.com' id='2vM3f-17' type='set'>
<command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#delete-user'></command>
</iq>
RECEIVED
<iq xml:lang='en' to='adminaccount#xmppserver.com/163923254889085958281501260654263394' from='xmppserver.com' type='result' id='2vM3f-17'>
<command status='executing' sessionid='2017-07-28T16:51:12.784282Z' node='http://jabber.org/protocol/admin#delete-user' xmlns='http://jabber.org/protocol/commands'>
<actions execute='complete'>
<complete/>
</actions>
<x type='form' xmlns='jabber:x:data'>
<title>Delete User</title>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/admin</value>
</field>
<field var='accountjids' type='jid-multi' label='Jabber ID'>
<required/>
</field>
</x>
</command>
</iq>
Here I'm not sure what the <actions...> tag is about; it's not mentioned in XEP-133. Other than that the form looks good.
SENT
<iq to='xmppserver.com' id='2vM3f-19' type='set'>
<command xmlns='http://jabber.org/protocol/commands' sessionid='2017-07-28T16:51:12.784282Z' node='http://jabber.org/protocol/admin#delete-user'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/admin</value>
</field>
<field var='accountjids' type='jid-multi'>
<value>jid#xmppserver.com</value>
</field>
</x>
</command>
</iq>
RECEIVED
<iq xml:lang='en' to='adminaccount#xmppserver.com/163923254889085958281501260654263394' from='xmppserver.com' type='error' id='2vM3f-19'>
<command sessionid='2017-07-28T16:51:12.784282Z' node='http://jabber.org/protocol/admin#delete-user' xmlns='http://jabber.org/protocol/commands'>
<x type='submit' xmlns='jabber:x:data'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/admin</value>
</field>
<field var='accountjids' type='jid-multi'>
<value>jid#xmppserver.com</value>
</field>
</x>
</command>
<error code='400' type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
I also tried sending bare JIDs (i.e. without the hostname part) but the result is the same.
This is not a particularly helpful error message.
What am I doing wrong?
[1] https://xmpp.org/extensions/xep-0133.html#delete-user
[2] https://github.com/processone/ejabberd/issues/1890
[3] https://pastebin.com/5D0rEbFR
Apparently <error code='400' type='modify'> is eJabberD's way of saying 'user not found, nothing to delete'.

Need to use yatra.com API in my website

asalamualikum , I need to used yatra.com api on my website which is an asp.net website.I have got a word document from yatra(air integration document). Yatra api is xml based , air integration document shows format of xml requests and responses but I haven't used xml in webservices and have no idea but I have concept of xml but have used xml only to read and write files on local system.Now I have a problem I dont know how to use xml in webservices and how to recieve response from api and display it on my page or sent request to api..If any one can help me I will be very thankful to him......If you could give me ne url or a video where user have used some api(xml based) for integration. Help will be strongly appreciated.If anyone can give me sample code for below request and resonse.
Sample request to yatra api:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<OTA_AirLowFareSearchRQ EchoToken="0" SequenceNmbr="0" TransactionIdentifier="0" AvailableFlightsOnly="" DirectFlightsOnly="" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS xmlns="http://www.opentravel.org/OTA/2003/05">
<Source AgentSine="" PseudoCityCode="NPCK" TerminalID="1">
<RequestorID ID="AFFILIATE"/>
</Source>
<YatraRequests>
<YatraRequest AffiliateID="EASTBOUND"/>
</YatraRequests>
</POS>
<TravelerInfoSummary>
<AirTravelerAvail>
<PassengerTypeQuantity Code="ADT" Quantity="1"/>
<PassengerTypeQuantity Code="CHD" Quantity="1"/>
<PassengerTypeQuantity Code="INF" Quantity="1"/>
</AirTravelerAvail>
</TravelerInfoSummary>
<SpecificFlightInfo>
<Airline Code=""/>
</SpecificFlightInfo>
<OriginDestinationInformation>
<DepartureDateTime>2011-09-11T00:00:00</DepartureDateTime>
<OriginLocation CodeContext="IATA" LocationCode="DEL">DEL</OriginLocation>
<DestinationLocation CodeContext="IATA" LocationCode="BOM">BOM</DestinationLocation>
</OriginDestinationInformation>
<TravelPreferences>
<VendorPref Code="SG"/>
<VendorPref Code="DN"/>
<CabinPref Cabin=""/>
</TravelPreferences>
</OTA_AirLowFareSearchRQ>
</soapenv:Body>
</soapenv:Envelope>
Sample Response from yatra api
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<OTA_AirLowFareSearchRS Version="2.001" xmlns="http://www.opentravel.org/OTA/2003/05">
<PricedItineraries>
<PricedItinerary CompositeFlightNumber="S2101" CountCompositeFlightNumber="1" OriginDestinationRPH="0" SequenceNumber="1" SupplierSystem="Amadeus">
<AirItinerary SupplierSystem="Amadeus">
<OriginDestinationOptions>
<OriginDestinationOption Duration="01:55:00" FromCache="true" SupplierSystem="Amadeus">
<FlightSegment ArrivalDateTime="2007-11-11T08:55:00" DepartureDateTime="2007-11-11T07:00:00" E_TicketEligibility="Eligible" FlightNumber="101" RPH="1" ResBookDesigCode="O">
<BookingClassAvail RPH="1" ResBookDesigCode="O" ResBookDesigQuantity="4"/>
<DepartureAirport LocationCode="DEL"/>
<ArrivalAirport LocationCode="BOM"/>
<Equipment AirEquipType="737"/>
<MarketingAirline Code="S2"/>
</FlightSegment>
<FormData>
<FareInformationIDs>
<FareInformationID BaseFare="1825" Code="" FareCode="UGOSAVE" FareID="0" PTCID="1" Quantity="">0</FareInformationID>
</FareInformationIDs>
</FormData>
</OriginDestinationOption>
</OriginDestinationOptions>
</AirItinerary>
<AirItineraryPricingInfo>
<ItinTotalFare>
<BaseFare Amount="1875" CurrencyCode="INR"/>
<Taxes>
<Tax Amount="1575" CurrencyCode="INR" TaxCode="TTL"/>
</Taxes>
<TotalFare Amount="3461.63" CurrencyCode="INR"/>
<ServiceTax Amount="11.63" Currency="INR" Description="Service Tax" ServiceTaxCode="ST" ServiceTaxRate="0.0062"/>
</ItinTotalFare>
<PTC_FareBreakdowns>
<PTC_FareBreakdown>
<PassengerTypeQuantity Code="ADT" Quantity="1"/>
<FareBasisCodes>
<FareBasisCode>OSASAS</FareBasisCode>
</FareBasisCodes>
<PassengerFare>
<BaseFare Amount="1875" CurrencyCode="INR"/>
<Taxes>
<Tax Amount="1575" CurrencyCode="INR" TaxCode="TTL"/>
</Taxes>
<TotalFare Amount="3450" CurrencyCode="INR"/>
</PassengerFare>
</PTC_FareBreakdown>
</PTC_FareBreakdowns>
<FareInfos>
<FareInfo>
<FareReference>OSASAS</FareReference>
<FilingAirline Code="ZZ"/>
<DepartureAirport LocationCode="DEL"/>
<ArrivalAirport LocationCode="BOM"/>
</FareInfo>
</FareInfos>
</AirItineraryPricingInfo>
<TicketingInfo DeliveryMethod="EMAIL" TicketTimeLimit="" TicketType="eTicket" TicketingStatus="" eTicketNumber="">
<TicketAdvisory Language="English"/>
</TicketingInfo>
</PricedItinerary>
</PricedItineraries>
</OTA_AirLowFareSearchRS>
</soapenv:Body>
</soapenv:Envelope>
You no need to worry about creating the xml or consuming the xml, if you are using C sharp side use WCF or any tool to create client by using Yatra.com wsdl.
Now treat evrthing as object oriented it will be responsibility of your C sharp client stubs to generate XML. you just need to map the values in stubs.

Generating XML dynamically from the data entered on UI

I have a xml file which is currently made manually and I have to make a functionality(UI) where user can enter the data and I have to store the data and generate the xml file dynamically in .NET.
Problem is the format of the xml file. I am not able to decide how I am going to store that data and then dynamically generate xml from that.
Please find the some of the extract of the code from the xml file below:
<?xml version="1.0" encoding="UTF-8"?>
<DATA>
<SDACTS>
<SDACT TYPE="Economy" COLOUR="0xff0000"/>
<SDACT TYPE="Environment" COLOUR="0x00ff00"/>
<SDACT TYPE="People" COLOUR="0x0000ff"/>
<SDACT TYPE="Society" COLOUR="0xff00ff"/>
</SDACTS>
<INDUSTRIES>
<INDUSTRY TYPE="Platinum" COLOUR="0x0094B1">
<PRODUCT>Platinum</PRODUCT>
<PRODUCT>Palladium</PRODUCT>
<PRODUCT>Rhodium</PRODUCT>
<PRODUCT>Gold</PRODUCT>
</INDUSTRY>
<INDUSTRY TYPE="Diamonds" COLOUR="0x652382">
<PRODUCT>Diamonds</PRODUCT>
</INDUSTRY>
<INDUSTRY TYPE="Metallurgical Coal" COLOUR="0x999a8f">
<PRODUCT>Metallurgical Coal</PRODUCT>
</INDUSTRY>
</INDUSTRIES>
<LOCATIONS>
<CONTINENT TITLE="South America">
<COUNTRY TITLE="Brazil">
<HEADOFFICE>So Paulo</HEADOFFICE>
<ADDRESS>
Sau, polo, ambikaui
</ADDRESS>
<LATITUDE>-23.571157</LATITUDE>
<LONGITUDE>-46.644146</LONGITUDE>
<BUSINESSUNITS>Nickel; Iron ore and manganese</BUSINESSUNITS>
<DESCRIPTION>Anglo American has been operating in Brazil since 1973. Our core operations are involved in the production of nickel, iron ore and maganese, while our interests in the production of phosphates and niobium at Copebras and Catalo respectively have been identified for divestment. Nickel projects in the pipeline include Barro Alto.</DESCRIPTION>
<EMPLOYEES/>
<NUMBEROFBUSINESS>2</NUMBEROFBUSINESS>
<!--New project added - 12/02/2010 start -->
<PROJECT>
<TYPE>Greenfield</TYPE>
<NAME>Minas Rio expansion</NAME>
<UNITTYPE>Iron Ore and Manganese</UNITTYPE>
<RELATEDOPERATION>Greenfield</RELATEDOPERATION>
<LATITUDE>-18.92814</LATITUDE>
<LONGITUDE>-43.42562</LONGITUDE>
<STATUS>Future unapproved</STATUS>
<DESCRIPTION/>
<FULLPRODUCTIONDATE>TBD</FULLPRODUCTIONDATE>
<PRODUCTIONVOLUME>Up to 53 Mtpa iron ore pellet feed (wet basis)</PRODUCTIONVOLUME>
<!-- <ESTIMATEDCAPEX>TBD</ESTIMATEDCAPEX>-->
<FOOTNOTES>
<![CDATA[1. Capital expenditure shown on 100% basis in nominal terms. Platinum projects reflect approved capex.<br><br>2. Production volume represents 100% of average incremental or replacement production, at full production, unless otherwise stated.]]>
</FOOTNOTES>
</PROJECT>
<SDACTIVITY>
<ID>3.2.4.20</ID>
<TYPE>Society</TYPE>
<BUSINESS>Nickel</BUSINESS>
<RELATEDOPERATION/>
<HEADING>Listening - and acting - in Brazil</HEADING>
<SUBHEADING>SEAT community engagement session in Brazil</SUBHEADING>
<COPY>
local government.
</COPY>
<IMAGE>3.2.4.20.jpg</IMAGE>
<LINKCAPTION>Read more about SEAT in Brazil</LINKCAPTION>
<LINKURL>http://www.angloamerican.co.uk/aa/development/case-studies/society/society01/</LINKURL>
</SDACTIVITY>
</COUNTRY>
</CONTINENT>
</LOCATIONS>
</DATA>
You could just store it directly in the DOM, and serialise when desired.
If I were you I would just store the data in a db and then use an xmltexwriter to write it to where ever.
using (XmlTextWriter writer = new XmlTextWriter(OutputStream, Encoding.UTF8)) {
writer.Formatting = Formatting.Indented;
writer.WriteStartDocument();
writer.WriteStartElement("DATA");
writer.WriteStartElement("SDACTS");
foreach ( SDACT in SDACTs) {
writer.WriteStartElement("SDACT");
writer.WriteAttributeString("TYPE", SDACT.Type);
writer.WriteAttributeString("COLOUR", SDACT.COLOUR);
writer.WriteEndElement();
}
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndDocument();
}
You could also take advantage of using .nets XML serialization see http://msdn.microsoft.com/en-us/library/ms950721.aspx

Resources