Getting the URL of a Mailchimp list via the API - mailchimp

I'd like to link directly to a Mailchimp list in the Mailchimp dashboard. I have full API access, and the list id is: bb7b537cd0.
However, I notice when looking at the dashboard URL that the URL is:
https://us5.admin.mailchimp.com/lists/members/?id=212269
The id 212269 is not present in the API response data about this list.
Is there any way of linking directly to the list that I'm not aware of?
Thanks!

This isn't possible through v3.0, but is possible in older versions. The main reason it was removed from 3.0 is that the dashboard URLs can change without notice, so relying on a particular algorithm to build them isn't advisable.

Related

Getting messages per subaccount using the Mailchimp API

I was looking at the Mailchimp API documentation because I want do an implementation where I list all the messages per subaccount. This doesn't seem possible. You get all the messages from every subaccount. Same if you use a webhook. The subaccount API options seem very limited.
I'm using the Mailchimp Transactional PHP lib. I tried using the messages->search() method where I set senders param but that doesn't really capture everything linked to the subaccount. It would be great if you could add a subaccount param to the messages->search() method. You can filter afterwards by looping through every result and checking the subaccount but that seems like a crappy workaround.
Anyone have another workaround? I see there is no way to report bugs or feature request on their Github? Or know how to contact the developers?

Shopify Storefront API 2020-10 (latest) can't fetch quantityAvailable (GraphQL)

For the first time I'm working with Shopify Storefront API (v. 2020-10, latest) and trying out GraphQL (I'm used to REST).
I'm able to get all the products, but if I add the field "quantityAvailable" an error occur:
Field 'quantityAvailable' doesn't exist on type 'ProductVariant'
I'm following the docs where the field is listed,
can you help me understand what am I doing wrong?
Edit #1
I've already enabled "Read inventory of products and their variants" in Storefront API Permissions.
Edit #2
I'm sending a POST request to https://{my-shopify-website}/api/graphql attaching content-type and X-Shopify-Storefront-Access-Token as header
Using the /api/2020-10/graphql end-point allows the usage of quantityAvailable property, but using the unstable end-point /api/graphql doesn't.
This seems more like a Shopify docs or API bug/issue, but the solution is to use the specific version end-point (/api/2020-10/graphql) instead of the unstable one.

Dart googleapis 0.35.0 - Google Drive API v3 - fields request parameter

Google Drive API v3 documentation:
Full resources are no longer returned by default. Use the fields query parameter to request specific fields to be returned. If left unspecified only a subset of commonly used fields are returned.
Either there is a fields request (query) parameter in the googleapis Dart library (which I can't find) or the library is useless for Google Drive API v3. Or maybe a workaround?
Looks like the fields need to be added to the URL
https://github.com/dart-lang/googleapis/blob/571f592976b7cf557d94bd0fc61b412fc1087446/generated/googleapis/lib/drive/v3.dart#L87
https://developers.google.com/drive/v3/web/performance#partial
https://www.googleapis.com/demo/v1?key=YOUR-API-KEY&fields=kind,items(title,characteristics/length)
I believe it means that some HTTP requests (in the underlying web api) require a additional ?fields='...' parameter to know what fields to include in the response. That documentation page helpfully gives a list of fields but does not say which requests require the parameter.
I personally find neither the Google api pages nor the Dart Google API libraries documentation to be very helpful, however, the Google OAuth Playground allows all the apis to be executed and tested. I used this tool to figure out what inputs are required for each web request and to make sure my Dart code was getting expected results.
Edit:
Every request in the api MAY include a ?fields='...' parameter, but don't have to.
If left unspecified only a subset of commonly used fields are
returned.
So depending on what you are doing you may not need to specify it.

Google Places API Email/Website

Is there a way to get Email/Website of a particular place using Google Places API? If this is not possible is there a way other than using Google API?
To retrieve a places website address using Google Places API, you could perform a Places Autocomplete Request with the input parameter value set to the name of the place: e.g.input=Amoeba
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Amoeba&sensor=false&key=your_api_key
Then using the reference from the response you could perform a Places Details Request: e.g.
reference=ClRMAAAAVzPUTLym999EXs4mKkpTqEmzX0a2kfXCUs4enTvWMHDd06VLvlzsGOdfrRd2QvkiRWs4sNkraAAJlMdytt4O4kYGoJZn4ENL5Ig5QYyeJmMSECDOGMO1MnDFtqzdqD8oDk0aFJr8_s-Y946QOz24YubPUsmoC2vl
https://maps.googleapis.com/maps/api/place/details/json?reference=ClRMAAAAVzPUTLym999EXs4mKkpTqEmzX0a2kfXCUs4enTvWMHDd06VLvlzsGOdfrRd2QvkiRWs4sNkraAAJlMdytt4O4kYGoJZn4ENL5Ig5QYyeJmMSECDOGMO1MnDFtqzdqD8oDk0aFJr8_s-Y946QOz24YubPUsmoC2vl&sensor=false&key=you_api_key
This would return the details for Amoeba including if available, the parameter website which would contain the places website address.
Google Places API provides Details requests and responses using your API key.
The tag allows for the google places url for that places
e.g.
http://maps.google.com/maps/place?cid=10704550479004381649
If you wish to harvest website, fax and opening hours information, it can only be done here.
There is no direct api in the Google Places API that will provide that info.
Just as addressComponents are part of the Details response, i assume tags will be added to the Place Details responses from the API to address this problem.
I have been trying to use Google Places API, and I have successful queries, fetching Places details, which has all the address information for the place I want to find, but ironically, there is NO WEBSITE attribute in the returned JSON!
The first version of Local search was MUCH better, and always accurate for searches when you know the business name.

How to fill out AJAX form programmatically and scrape results?

Basically, I want to use the Facebook Ads Manager Tool to estimate the number of users targeted by a particular set of targeting parameters. I know there is a published API available, but it is only usable if you are on their advertising application "whitelist." I am sure what I am asking is possible. Plus, it would be interesting to learn more about scraping.
Facebook's Ads Manager Tool is basically an AJAX UI for their ads API. In the process of creating a campaign, you can specify targeting parameters, and the page will dynamically report the number of users targeted as you modify the parameters. From what I've read on the web and here on stackOverflow, it is possible to use Firebug or a similar tool to pick apart what requests are being made by the page and to where, then mimicking these calls to get the information you want.
I'm having trouble interpreting the panels of Firebug. I think the URI I'm trying to send a request to is www.facebook.com/ajax/inventory_estimator.php, though I'm not sure how to form a call.
So, if I want to write a script or program that takes a list of words to use as keywords and returns the estimated number of users for each keyword, how could I do it?
Link to Facebook's Ads Manager Tool, Campaign Creation Page:
http://www.facebook.com/ads/create
yes using an extension like firebug to examine the HTTP requests is a good way to do this.
The Net tab is the one you want (last one).
Have you tried irobotsoft webscraper? It has a good ajax support.
Check their forum here: http://irobotsoft.org/bb/YaBB.pl

Resources