How to change the default return amount - MailChimp API Json - arrays

I am having trouble. Trouble which i am sure is but a moments thought to resolve for our resident experts but, i must learn...
I am returning lists and as I understand it the default return is 25. I have a total of 93.
Below is what i am using (minus our API Key)
http://us1.api.mailchimp.com/1.3/?method=lists&apikey=
I believe that i need a piece of code [limit]=100 as MailChimp suggests but there are numerous pieces of advice on the website and after trying all i am still without my desired output.
If you could advise the way to do this I would be very grateful.
Thanks
Will. :)

Limit should work:
http://us1.api.mailchimp.com/1.3/?method=lists&apikey=YOUR_KEY&limit=100
It was working perfectly fine for me. Check if you are in the right region (in my case I was in us13).

Related

Coinbase API - Conversion Endpoint /conversions

After plenty of late nights and head scratching I have navigated the murky world of the 'Coinbase Pro API' and integrated it with a new trading app I have made. I have hit a snag however and am baffled as to why. Had a snoop around all the usual 'Google' hotspots and I can find similar questions but no answers. I hope someone can help?!
Simply put I want to do a conversion, see the seemingly simple endpoint to do so:
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postconversion
https://api.exchange.coinbase.com/conversions
Now; it's not an authentication issue etc. As mentioned, I have the API fully working in my app, accounts, orders, ticker etc, all no problem. Just conversions I have an issue with. I am posting the relevant variables as suggested:
Example:
{"to":"ETH","amount":"50.00","from":"BTC","profile_id":"my_profile_id"}
No matter what currencies I try, the response is always the same:
{"message":"Cannot convert BTC to ETH"}
With different coin ID's of course.
Full on drawing a blank here! Kind of a useless output from Coinbase?
I'd love to know if anyone has cracked this?
Thanks
Pete
Understood and thank you. After some back and forth with Coinbase support I found while conversion is possible in app, fee free, in API it’s an order with the relevant fees. A little frustrating but hopefully they will allow API conversion fee free soon 👍😊
"You can’t do a conversion unless their values are linked, such as USDC-USD. What you are looking to do is a market buy of some type, I would suggest a limit order as you can specify price options."
https://forums.coinbasecloud.dev/t/unable-to-successfully-convert-crypto-to-another-crypto/289
"You can’t do a conversion unless their values are linked, such as USDC-USD. How to determine if a conversion is linked, I'm not following this answer.
Is this what you mean?
{"to":"ETH-USD","amount":"50.00","from":"BTC-USD","profile_id":"my_profile_id"}

Scopus DOIs not working in article retrieval APIs

I’m trying to use the Elsapy module to extract the abstracts of documents on certain topics.
I am able to do this but, unfortunately, only for a fraction of the documents found.
For example, a particular search returns 16 documents but I am only able to extract the information (e.g. abstracts) from 4 of them.
Upon further inspection, it seems that for the documents I can’t get the abstracts of:
-Don’t have a PII
-And have DOIs that don’t work.
I have tested the DOIs in the article retrieval interactive API guide
-The ones that returned abstracts worked fine
-The other ones return the error:
RESOURCE_NOT_FOUNDThe resource specified cannot be found.
Even though I have found the original articles and checked their DOI is correct.
An example of one that didn’t work is:
Sengupta, N. K., & Sibley, C. G. (2019). The political attitudes and subjective wellbeing of the one percent. Journal of Happiness Studies, 20(7), 2125-2140. doi:10.1007/s10902-018-0038-4
I have found that the ones that do ‘work’ all have the general form:
10.1016/j.ssmph.2019.100471
10.1016/j.apacoust.2015.03.004
Please let me know if you know why this is and how I can fix it.
Thanks for your help :)
The Article Retrieval API works for Elsevier content hosted on sciencedirect.com; all Elsevier articles have PII identifiers. The example DOI 10.1007/s10902-018-0038-4 does not work because it is published by Springer and, consequently, not available on ScienceDirect.
Kindly note that this is not a bug and everything is working as expected.

Custom Searcher - Blending of hits from different sources

We have a need for "Blending of hits from different sources", as per your documentation it is recommended to write a custom-searcher in JAVA. Is there a demo of this written somewhere on Github ? I wouldn't even know where to start :( I understand I can create search "chains" , preferably Asynchronous, and then blend results in JAVA before returning them...but then how would I handle paginations, limits...etc ? This all seems very complicated, for someone who doesn't even know JAVA that much. So, I am hoping someone has already written a demo for this ? Please ? Anyone ?
Thank you so much
EDIT to make my quesion clearer:
We are writing a search engine that fetches data from various websites. Some websites have 10mil indexable items, other websites only 100,000. When we present the results to end user, we want to include results from all our sources ( when match applies ). Let's say 10 results from each of the websites we crawl, so that they all get equal amount of attention on page. If we don't do custom blending, what happens is that the largest website with most items wins all our traffic.
I understand that we can send 10 separate queries to VESPA, and blend the results in our front end, but that seems very inefficient. Thus, the quesion of "Custome Searcher". Thank you so much !
That documentation covers some very advanced use cases which you do not have. Are your sources different Vespa schemas or content clusters? If so Vespa will by default blend the hits returned from each according to their relevance scores so there's nothing you need to do.
The two other most common use-cases are:
Some (or all) the data sources are external, so you need to write a Searcher component to fetch the external data and turn it into a Result.
You want the data to be blended in some custom way (rather than by relevance score). If so you need to exclude the default blending Searcher (com.yahoo.prelude.searcher.BlendingSearcher) and write your own.
If you provide some more information about your use cases I can give you some code examples.
EDIT: Use grouping to solve the need explained under "EDIT" in the question:
Create a "siteid" field when feeding (e.g in document processing).
Use the grouping expression all(group(siteid) each(max(10) output(summary())))
See http://docs.vespa.ai/documentation/grouping.html

Database moddelling - Trying to understand

Hey guys, I always get confused by this so it's not exactly my strong point :( Am I understanding correctly that the above example suggests:
One shop must have one or more clients
One client must have one shop
If there was to be a circle where at the end of the client arrow it suggests that the shop has zero or many clients.
I know it's a bad example but I am just trying to get my head around it. (Always get it the wrong way round)
Thanks very much, all help appreciated.
it's just a quick example so I apologise for the bad naming convention of table names
Yes, you are understanding correctly.

Problem with performance counters on Vista

I'm running into a strange issue on Vista with the Performance monitoring API. I'm currently using code that worked fine on XP/2k, based around PdhGetFormattedCounterValue(). I start out using PdhExpandWildCardPath to expand the counters (I'm interested in overall network statistics), the counters I'm looking at are:
\\Network Interface(*)\\Bytes Received/sec
\\Network Interface(*)\\Bytes Sent/sec
\\Processor(_Total)\\% Processor Time
The problem is that on their first call they return PDH_INVALID_DATA, I don't think this is a problem, since if I query it again I will start getting data without the error. The problem is this - while the processor time is worked exactly as expected, neither of the network interface counters are returning anything - just 0 all the time. I verified using Perfmon that they are reporting data normally, so I'm at a loss as to what might be the issue. I caught this at MS:
http://support.microsoft.com/?scid=kb%3Ben-us%3B287159&x=11&y=9
But I'm not interested in multi-language for my task, so I don't think this is relevant. I will see if I can come up with some basic code showing exactly what I'm doing, but nothing is returning anything strange, and it worked on XP/2k, so I suspect something changed under the hood. Thanks!
It turns out the issue was that the network interfaces are both wildcards, whereas the Processor one is actually already rolled up by the performance monitoring. What I didn't realize was that it PdhExpandWildCardPath didn't return something directly usable by PdhAddCounter. By this I mean that if ExpandWildCard returns 3 expanded matches, they come back as a null separated strings - I understood this, but I had assumed that AddCounter would be effectively create a counter containing all three. Nope, reality is I needed to break up each path and request it individually from AddCounter, then roll up the results manually when I get them.
Hopefully this helps someone else to avoid the same mistake I made with less frustration. ;)

Resources