I need to build a code that connects to AppNexus API, to create/update segments, and upload users lists.
I thought the easy way will be by Python, since I found this library: https://appnexus-client.readthedocs.io/en/feature-readthedocs/get_started.html
However, all the examples I find online are exactly the same as in the link - a very shallow use in one option that doesn't relates to the real abilities this tool has.
Does anyone knows if there's a good documentation out there for AppNexus?
Maybe someone already tried it and can recommend a nice and easier way to connect to their API (I saw in AppNexus documentation a large use in curl commands)?
Thank you!
You can use Postman or terminal to authenticate into AppNexus and then run the curl commands, AppNexus Segments Doc has samples on how to do this here: (https://wiki.appnexus.com/display/api/Segment+Service) You can also use a library to turn curl commands into your preferred programming language for example in Ruby you can use curl-to-ruby: (https://jhawthorn.github.io/curl-to-ruby/)
Related
I want to perform what I think is a fairly simple task - using python I would like to obtain a list of Google Cloud Functions in a given project and want to figure out the correct library for doing so.
I'm trying to understand the myriad of repos at https://github.com/googleapis. I can see there is
https://github.com/googleapis/google-api-python-client
however at https://github.com/googleapis/google-api-python-client#other-google-api-libraries it is stated:
The maintainers of this repository recommend using Cloud Client Libraries for Python, where possible, for new code development
and following the link there leads me to
https://github.com/googleapis/google-cloud-python
at which there is a link to
https://github.com/googleapis/python-functions
This would seem to be the more appropriate library to use (pip install google-cloud-functions) for the reasons stated at https://github.com/googleapis/google-api-python-client#other-google-api-libraries.
The problem I have is that there seem to be many examples/samples that demonstrate the use of https://github.com/googleapis/google-api-python-client but less so for https://github.com/googleapis/python-functions. In fact my google-fu has failed me miserably because I can't find any examples of how I might use https://github.com/googleapis/python-functions to achieve my task (i.e. get a list of Google Cloud Functions). The API documentation at https://googleapis.dev/python/cloudfunctions/latest/index.html is somewhat helpful however it seems rather lacking in sample code. One question I'm asking myself, for example, is should I be using
google.cloud.functions_v1.services.cloud_functions_service.CloudFunctionsServiceClient
or
google.cloud.functions_v1.services.cloud_functions_service.CloudFunctionsServiceAsyncClient
or perhaps even something else.
Can someone explain how I can use CloudFunctionsServiceClient or CloudFunctionsServiceAsyncClient to get a list of functions?
Figured it out. These work
from google.cloud.functions_v1.services.cloud_functions_service import CloudFunctionsServiceAsyncClient
from google.cloud.functions_v1.types import ListFunctionsRequest
list_functions_request = ListFunctionsRequest(parent=f"projects/{project}/locations/{region}")
await CloudFunctionsServiceAsyncClient().list_functions(list_functions_request)
from google.cloud.functions_v1.services.cloud_functions_service import CloudFunctionsServiceClient
from google.cloud.functions_v1.types import ListFunctionsRequest
list_functions_request = ListFunctionsRequest(parent=f"projects/{project}/locations/{region}")
await CloudFunctionsServiceClient().list_functions(list_functions_request)
I am using python 3.6. I am planning to incorporate houndify in a project that I'm working on. I want to use the Houndify API to make voice requests (using only a few domains like Weather, Map, Knowledge, Wikipedia, etc.). The documentation on the page left me kind of confused, so I would really appreciate it if anyone could explain (with example code of course) how I can use the Houndify API to get results.
PS: I Don't want to use my browser in any way. All I want to use is my python code.
Have you tried looking at the documentation in the README? It has a lot of useful info. If there is a more specific question, please let me know.
https://docs.houndify.com/sdks/docs/python
My answer is quite specific to the Betfair API however I would like to know how to use more APIs in general. I'm quite new to this sort of thing so don't really know how it works. I've just downloaded this package: https://github.com/jmcarp/betfair.py
My question is, how am I supposed to know the functions that come associated with it? How am I supposed to be able to know how to pull the data that I want from any given website without having any resource describing the functionality of the API?
These library is only a binding (with several errors) to Betfair APIs.
You can find documentation about this API, and therefore about this library, in Developer's web.
If you're interested in how to use Betfair APIs in Python you can take a look at Betfair's code samples.
I would appreciate some help here.
Google checkout has many ways to send it checkout data. I am using the XML server-to-server.
I have everything ready and now I want to throw some xml at google. I have been doing some reading and I know of a couple of ways to do this, one with urllib, another with pyCurl, but I am using django over here and I searched the Django api for some way to POST data to another site and I havent fallen upon anything. I really would like to use the django way, if there is one because I feel it would be more fluid and right, but if you all don't know of any way I will probably use urllib.
urllib2 is the appropriate way to post data if you're looking for python standard library. Django doesn't provide a specific method to do this (as well as it shouldn't). Django goes out of it's way to not simply reinvent tools that already exist in the the standard library (except email...), so you should never really fear using something out of the python standard library.
requests is also great, but not standard library. Nothing wrong with that though.
I want to integrate Zanox feeds in a Django project. Unfortunately there seem to be no client library implementations in Python.
Or are there?
What is the next best alternative to a Python library? Using the Ruby version?
Would have been useful to say what Zanox was in your question. For those interested, they appear to be an advertising network.
Anyway, they do seem to expose a pretty simple XML or JSON feed, as documented here. It looks pretty simple to get that using urllib2 or requests and parse it using json.load.
You can use https://pypi.python.org/pypi/python-zanox-api/ in a custom management command.