Retrieving extended CSV data from Google Checkout's Order Report API - csv

The Google Checkout orders page allows you to download the orders data as CSV. There is a checkbox that allows you to specify that the CSV should include extra data (buyer's name and address, product details).
The Google Checkout Order Report API provides a way to get CSV order data programmatically. However, it doesn't seem to be possible to get the data in the extended format. Am I missing something? Is there some way to specify that you want the full data?
The default data is pretty uninformative.

Well it's not documented, but after a bit of sniffing around and experimenting I discovered that the <order-list-request> API method accepts another nested parameter tag, <column-style>, and that this should be set to EXPANDED.
So a request for the full CSV looks like this:
<order-list-request xmlns="http://checkout.google.com/schema/2"
start-date="2010-08-01T00:00:00"
end-date="2010-08-31T23:59:59">
<date-time-zone>Europe/London</date-time-zone>
<column-style>EXPANDED</column-style>
</order-list-request>

Related

Extract JSON Data From ThingSpeak API

so i want to get the value from one oof my fields in my thingspeak, i'm able to extract data from my channels but i want to get only one specific field
i read the documentation and the api link that looks like this
https://api.thingspeak.com/channels/<channel_id>/feeds.json?results=1
and when i opened the link it showed this
{"channel":{"id":1688112,"name":"ESP8266 - Web Controlled LED","latitude":"0.0","longitude":"0.0","field1":"Command","field2":"Red LED","field3":"Green LED","field4":"Blue Led","created_at":"2022-03-29T00:36:06Z","updated_at":"2022-04-06T03:12:36Z","last_entry_id":443},"feeds":[{"created_at":"2022-04-10T07:06:01Z","entry_id":443,"field1":null,"field2":"0","field3":"0","field4":"0"}]}
so my question is how do i extract the data for example from my field2 data where "field2":"0"?
i want to use it for my project in my html where later it can do some functions in my content.
thanks!
It really depends on the program you use.
But usually you find a JSON library to be installed in your IDE.
With it you extract any field from the JSON file

Download csv file with dynamic filter values

I have a dashboard with various filters and a data table that I would like to download as a .csv file. I have tried the trick of just appending ".csv" to the end of the url and that works fine for downloading all of the data, however I need to have my csv file contain only the filtered data that is shown in my data table.
I can manually apply a filter in the url with something like Value="FilteredItem" and this behaves as I expect with a csv file, however for this I have to specify what I am filtering on and I need this to be dynamic based on what the user of my dashboard has selected/entered for the filters.
What is the correct way to append to the url to pass through the filters such that the resulting csv file contains only the filtered data?
The easiest way to do this is to use the Export All dashboard Extension for Tableau 2018.2 or later.
If you have an earlier version, this method is another way to accomplish the same thing. You can construct the URLs with all of the filter values that you need.

How do I use Pentaho spoon to push data from MySQL database to facebook webpage

1) I have already made transformation mapping for getting data from specific MySQL (Table Input) and convert it as Text File output.
2) Also I have created a facebook developer account page and trying to figure out how the Facebook API works to push data from MYsql to facebook.
3) would appreciate if transformation mapping can be provided. Also I would not like to use XML, instead I would like to use JSON.
Already the msql table is converted to csv file, but I am not sure how to post the csv file to facebook or is there a way to connect mysql table to facebook directly. Please share your ideas or transformation mapping. Thanks
I would Assuemm you are familiar with Facebook Development API to do all actions like post,get and so on.
You have a step called "REST CLIENT STEP" in Pentaho.
you will have an API url to post the data that you want from mySQL. There several methods GET PUT POST DELETE
Also set the Application Format to Json (XML,JSON etc).
I used to read data from FB using REST Client by using GET Method. Work around.

Specifying multiple columns of Quandl data to download with column_index

With Google Financial, you can specify which columns of data you want to download. Can that be done with Quandl data? If so, I can't find an example that illustrates how.
I want to download Open and Close data only, not the entire table which is quite large. Quandl does supply a URL parameter, column_index that allows specification of a single column, so I can query for Close data only, or Open data only, but not both.
Perhaps, this can't be done. Could someone please confirm?

Google Drive - Changes:list API - Detect changes at folder level

I'm testing out Google Drive 'Changes' API and have some questions.
Expectation:
I've folder tree structure under 'My Drive' with files in them. I would like to call the Changes:list API to detect if items have been added/edited/deleted within that specific folder id.
APIs Explorer tried: https://developers.google.com/drive/v2/reference/changes/list
Questions:
I don't see any option to pass a specific folder id to this API for getting the 'largestChangeId'. Looks like this api doesn't support the parm 'q'? Is it possible?
As an alternate solution, thought of storing the 'modifiedDate' attribute for that folder and use it for comparing next time. But, it's not getting updated when items are updated within that folder. Should it not work like in windows where folder modified date gets updated when its contents gets updated?
Would like to hear if it's possible to detect changes at folder level.
Thanks
[EDIT]
Solution that worked:
Use Files:list to list all.
selected fields: items/id,items/modifiedDate,items/parents/id,items/title
Get starting folder id ( e.g for 'MyRootFolder' using Title search)
Traverse through the sub-tree structure (linking parents:id and file Id) using recursive array search and get max modifiedDate and total file counts.
Store max modifiedDate and file counts in the app storage.
For subsequent calls, compare the new max modifiedDate with the stored and also compare total file counts with the stored. If either one doesn't match, then contents within 'MyRootFolder' has been updated.
This is not currently possible directly with the API -- sorry!
I think the best current solution would be to use the regular changes feed and filter results in your code to ones with the correct parents set.
drive.changes.list google drive API now allows users to pass the "startChangeId" parameter.
Im using the value I get for "largestChangeId" from the previous API result, So I can incrementally build the changes done by the user, avoiding the need to rebuild the entire tree.
how ever I'm surprised to see why they don't support the "includeDeleted" parameter together with "startChangeId" parameter.