Hi fellow stackoverflowers! :)
I am wiring my application with adwords API, and want it to display reports based on the retrieved data. My problem is that I am using test account that have no data that could be used for reporting, and so far us I understand testing account don`t provide any. According to the https://developers.google.com/adwords/api/docs/test-accounts#developing_with_test_accounts I should fake data. I am totally fine writing tests and feed then with fixtures, expect I can't find any relevant example of how the response XML will look like so I can create my own fixtures.
For example:
I want to pull campaign performance report, and segment it by Week
<reportDefinition>
<selector>
<fields>CampaignId</fields>
<fields>Clicks</fields>
<fields>Impressions</fields>
<fields>Week</fields>
<predicates>
<field>CampaignId</field>
<operator>EQUALS</operator>
<values>111111</values>
</predicates>
<dateRange>
<min>20150201</min>
<max>20150601</max>
</dateRange>
</selector>
<reportName>Campaign Performance Report NAme</reportName>
<reportType>CAMPAIGN_PERFORMANCE_REPORT</reportType>
<dateRangeType>CUSTOM_DATE</dateRangeType>
<downloadFormat>XML</downloadFormat>
<includeZeroImpressions>true</includeZeroImpressions>
</reportDefinition>
Which gives me response:
<report>
<report-name name="Campaign Performance Report NAme" />
<date-range date="Feb 1, 2015-Jun 1, 2015" />
<table>
<columns>
<column name="campaignID" display="Campaign ID" />
<column name="clicks" display="Clicks" />
<column name="impressions" display="Impressions" />
<column name="week" display="Week" />
</columns>
</table>
What will be the response with actual data? How it is going to look like in case segmentation will be set to: Date, Month, Quarter, Year?
I have tried to find any xml example on the web and github without luck. Can you please share response examples or point me to the doc, where it says how can I "generate" data for my test acount?
Thank you!
eolexe, I am assuming you did not receive an error for the Campaign Performance Report you tried to fetch. If that is the case then that means there was no match for the predicates and date range you had entered. This why you do not have the rows element within the XML. Also some attributes are are not filterable. But I am pretty sure the CampaignID is. Take a close look at the API just to be sure. You need to migrate to version 201502 because 201402 is deprecated and 201409's sunset day is in July.
I have been working on AdWords API for reporting purpose for years, and I can tell you up till now there is still no official sample XML or CSV given. So I simply test the program using real account data...
I don't pick XML as the response type so I cannot really address your question, but you may wish to know that the XML response does not return a total row. That's why I always pick CSV/TSV format.
Related
I have been using the following URL for the past 3 years without issue. However, it has stopped returning results.
URL:
https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys
Now returns the following:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2017-11-02T09:33:25Z" yahoo:lang="en-AU">
<results/>
</query><!-- total: 9 -->
Notice how there are no results, it simply has the tag "results".
I have tried on this many different computers and browsers. I have also tried changing the currency combinations, but no luck.
Can anybody spot what I am doing wrong?
Yes, it looks like Yahoo has discontinued their Currency Converter API service.
I found a different site : https://currencylayer.com/
They let you request currency rates (1 USD = 168 other currencies). If you make less than 1000 requests per month, it is free (if you need more, they have different subscriptions : https://currencylayer.com/product).
You just need to sign up and receive your own Access Code. Once you have that, then you simply make the call http://apilayer.net/api/live?access_key= and it will return JSON of the other currency rates.
They also have code examples in PHP, JavaScript, and Java at https://currencylayer.com/documentation
Found it very easy to get started using their API right away.
I think the API is down.
I am similarly receiving "results"=nullfor the query:
http://query.yahooapis.com/v1/public/yql?q=select+%2A+from+yahoo.finance.xchange+where+pair+in+%28%22GBPEUR%22%29&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
Setting diagnostics=true in the request yields:
`
[execution-start-time] => 7
[execution-stop-time] => 12
[execution-time] => 5
[http-status-code] => 999
[http-status-message] => Request denied
[content] => http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=snl1d1t1ab
`
If anyone knows more than me about what this might imply I'd be glad to hear it!
Yahoo is aware of this issue and their engineers are working on it:
ref: https://forums.yahoo.net/t5/Yahoo-Finance-help/http-download-finance-yahoo-com-d-quotes-csv-s-GOOG-amp-f/td-p/387096
Very sadly and quite outrageously Yahoo decided to stop this service without any warning.
See admin message here
So many services depend on it, it's like Google saying they would suddenly stop their maps API... At this point I am blocking yahoo in our DNS so no one in our company will ever use Yahoo again since they are not a reliable entity.
<!-- [h]:[m]:[s] [P,*-2] or [h]:[m]:[s] [P,2-2] or [H]:[m]:[s] -->
<property as="xs:string" name="oxf.xforms.format.input.time" value="[h]:[m]:[s] [P,*-2]"/>
I wonder if the Orbeon time picker can display hours with preceding zero e.g. parse from 5:00pm becomes 05:00pm, and found above properties.
Also, can anyone explain what [P, *-2] and [P,2-2] mean?
Regarding your questions:
You can use [P,2-2] if you don't want dots in am and pm.
Adding leading zeros currently isn't supported. (If your organization has a PE or Dev Support subscription, you can contact Orbeon to see if this can be implemented as a "sponsored feature".)
And you can find more about the supported format in the section of the documentation about xf:input formatting.
According to the documentation, LinkedTxns should be returned with both PurchaseOrders and Bills.
But, that feature does not appear to be working.
For example, this is the XML returned for the PurchaseOrder with DocNumber 1005.
<PurchaseOrder>
<Id>97</Id>
<SyncToken>6</SyncToken>
<MetaData>
<CreateTime>2014-06-24T16:21:18-0400</CreateTime>
<LastUpdatedTime>2014-06-25T10:42:03-0400</LastUpdatedTime>
</MetaData>
<DocNumber>1005</DocNumber>
<TxnDate>2014-06-24</TxnDate>
<PrivateNote>...</PrivateNote>
<Line>
<Id>7</Id>
<Amount>1600.0</Amount>
<DetailType>ItemBasedExpenseLineDetail</DetailType>
<ItemBasedExpenseLineDetail>
<ItemRef name="Transportation">21</ItemRef>
<UnitPrice>1600.0</UnitPrice>
<Qty>1.0</Qty>
<TaxCodeRef>NON</TaxCodeRef>
<BillableStatus>NotBillable</BillableStatus>
</ItemBasedExpenseLineDetail>
</Line>
<VendorRef name="...">3</VendorRef>
<APAccountRef name="Accounts Payable">51</APAccountRef>
<TotalAmt>1600.0</TotalAmt>
</PurchaseOrder>
And here is the screen shot from Quickbooks Online that shows that the linked transaction exists.
Is there a workaround for this problem? Is it caused by something that I can address?
LinkedTxn's are not supported for Bills at the time of this writing.
References:
See issue QBO-34591 on the following link:
https://developer.intuit.com/docs/0025_quickbooksapi/0058_faq/qbo_v3_known_issues
According to the release notes at https://developer.intuit.com/docs/0000_about_intuit_developer/0080_release_notes/quickbooks_api_release_notes This should have been addressed now.
This is a very specific Omniture API question. Thought I'd check here if anyone encountered this problem since Omniture forum was not of much help -
Sending the following parameters to Omniture API Explorer here - https://developer.omniture.com/en_US/get-started/api-explorer#Saint.ImportCreateJob seems to work fine.
{
"check_divisions":"1",
"description":"OSRA job description: MyReportID, Products, 51",
"email_address":"my#email.com",
"export_results":"0",
"header":["Field1", "Field2"],
"overwrite_conflicts":"1",
"relation_id":51,
"report_suite_array":["MyReportID"],
"c_view":"SomeReportName"
}
But the call fails in the actual code with a 'Bad Request'. It seems like c_view parameter is expecting a certain value. The only documentation for c_view is that it expects a report name. I've tried report names and other values with no luck. Would appreciate any pointers from Omniture API users.
Thanks.
try using the relevant value from the classification_view chart. I know this is what you need for using the get/save classifications methods (I have used those methods, but not the Saint.ImportCreateJob method).
c_value is not required, so unless you plan on using it, it does not need to be present. It is supposed to be a classification_view https://developer.omniture.com/en_US/documentation/omniture-administration/r-classification-view.
It takes some trial and error to get this api working.
Here is an example of a call I use that works using the REST api over Java:
Request:
{
"check_divisions":1,
"description":"Report Test 1",
"email_address":"cdegroot#adobe.com",
"export_results":"0",
"overwrite_conflicts":0,
"relation_id":65,
"report_suite_array":["cdgdev"],
"header":["Key","Survey","Survey^Question","Survey^Question^Response","Engagement Index","Survey > Question > Response"]
}
Response:
"3387166"
Kind Regards C.
To make a long story short:
Making a web application
Each user profile contains exactly one profile image, which is stored in the database
The bottom layer uses ADO.NET entity framework for data access and relationships between classes
Inserting images into the database on the bottom data access layer of the application works fine
On the top layer, in an MVC application, we use WCF to get the profile image to display. Displaying the image works fine no matter what the size, meaning that uploading images is the only problem.
In my Upload picture-function i can upload pictures up to 16k. Nothing bigger.
I have found all maxBufferSize and maxReceivedMessageSize properties in all app.config and web.config-files in the solution, and changed the values to 1MB (1 048 576)
This is the error i get:
The formatter threw an exception while
trying to deserialize the message:
There was an error while trying to
deserialize parameter
http://www.mydomain.com/contracts/profile/2009/07:userProfile.
The InnerException message was 'There
was an error deserializing the object
of type
Myproject.Commons.BusinessObjects.UserProfile.
The maximum array length quota (16384)
has been exceeded while reading XML
data. This quota may be increased by
changing the MaxArrayLength property
on the XmlDictionaryReaderQuotas
object used when creating the XML
reader. Line 1, position 44978.'.
Please see InnerException for more
details.
It also tells me that the source file of the error is Reference.cs within the service reference.
...and now i basically cannot understand where this really comes from. Anyone has a clue?
The error message says it all, really :-)
The maximum array length quota (16384)
has been exceeded while reading XML
data.
Besides all the maxBufferSize etc. settings, there's also a set of settings called ReaderQuotas which you can set when customizing a binding. One of those settings if the "maxArrayLength" which defaults to 16'384.
<bindings>
<wsHttpBinding>
<binding name="Default" bypassProxyOnLocal="true"
useDefaultWebProxy="true" >
<readerQuotas maxArrayLength="16384"
maxBytesPerRead="4096"
maxDepth="32"
maxNameTableCharCount="16384"
maxStringContentLength="8192"/>
</binding>>
</wsHttpBinding>
</bindings>
These settings influence how the DataContractSerializer on the server will deserialize your message - you can look up details on the MSDN docs and set the values as you need them.
Marc