I'm trying to use the target tool API but not having much luck formatting then HTTPS get string. The example is for python. I don't know python and am using vb.net.
Could someone give me a browser request string for targets that would? I can use that in my program. I have a key.
The example is as follows:
entry = requests.get("https://filtergraph.com/aavso/api/v1/targets",auth=(API_KEY,"api_token"),params={'obs_section':['all']})
I've tried all the variations I could think of.
Thanks
Nor
I know this is old, but just in case anybody comes across this. The documentation for python's requests package get method states that "params" values are a dictionary that is added as a querystring to the url. So in your example it would be https://filtergraph.com/aavso/api/v1/targets?obs_section=all. Furthermore the documentation for the api states the basic authentication should be set. So something like
Dim getReq As HttpWebRequest = DirectCast(WebRequest.Create("https://filtergraph.com/aavso/api/v1/targets?obs_section=all"), HttpWebRequest)
getReq.Method = "GET"
getReq.Headers.Add("Authorization", "Basic <api_key + ':api_token' base64 encoded>")