Google Cloud Endpoints discovery document changes / evolution support on iOS? - python

I'm implementing the iOS client-side of our Google Cloud Endpoints API, and want to know how Cloud Endpoints discovery documents get interpreted internally on iOS, so when I make changes on the Cloud Endpoints side (add a field, change a field name, delete a field) what happens to older clients?
I know that Cloud Endpoints exposes a REST JSON API for the Javascript/AngularJS side of things which we could tie into manually using something like AFNetworking on iOS. I'm familiar with how to manage API changes on the client in that scenario, but if it makes sense to utilize the Toolkit SDK / RPC implementation, then I'd rather do that.
Is this all handled by versioning the API, then? So older clients would request an older version of the API? Does the Google iOS SDK support semantic versioning then? I could see version numbers getting out of control quickly if not.
Note this is the python version of GCE.

You should be generating and using a client library, ultimately, if you don't want to both yourself with all kinds of implementation details of how to call the endpoints API. On the other hand, if you were to go with AFNetworking, it would be up to you do do your research as to how REST APIs can be called with AFNetworking. The REST API defined by endpoints can be read about in the documentation, and in addition you can use the API Explorer to test your methods and even capture the headers sent with these requests in your browser.
Secondly, it goes without saying that you shouldn't code an API, then change its specs radically without versioning it or notifying/updating any clients. The version system is implemented A) in the client library generated from your discovery doc and B) in the URL route of the REST API itself. You would want to choose whichever naming scheme for versioning that your target framework supports.
I hope this has cleared up any confusion for you.

Related

How do e-commerce websites integrate with ERP systems?

How does e-commerce usually handle integrations with ERP software?
We are working on a project for a client, who previously planned to use an ERP system that had a REST API.
This API allowed us to:
Place orders
Inform the ERP if the order was paid for
Get order status
Get all of the items available
Check item availability
Get user data
That would allow us to build a fairly complex online store with a lot of features.
Now the client wants to use another ERP system:
http://www.netsuite.com/portal/platform.shtml
I researched it, and the difficulty of integration surprised me. No REST API, some weird SOAP protocol to communicate with the system, and you have to write a lot of logic using SuiteScript. A whole new, different programming language just to build an integration with an online store? Why not just give developers access to an API to place orders and fetch items? And there are absolutely no docs available online for the thing. People on forums are saying that the system lacks in documentation and one has figure it out himself, along the way.
Magento and Shopify integration is done by third parties and looks dodgy. Same thing with SAP ERP. Am I missing something? Why is such a basic thing as a REST API for e-commerce not available for those systems?
Why develop using Python Django for the back-end and using React.js for the frontend. What is the right way to integrate them with the ERP system?
NetSuite does have a REST API and webservices. "you have to write a lot of logic using SuiteScript" is true but it's just JavaScript and there are many talented developers out there.
I'm not sure there is a "right way" but there are many ways to connect to the data.
My suggestion would be to contact a partner company, such as SWK Technologies. http://swktech.com
NetSuite has two main APIs, SuiteTalk and SuiteScript.
SuiteTalk is the Web Services API, which is SOAP based and allows for pulling data from and updating NetSuite. The SuiteScript API is JavaScript based and allows you to customize accounts and export data at the appropriate event during your business process. The term "SuiteCloud" encompasses all APIs and integration tools.
As for documentation, this is mostly only available to clients and partners. If you have a client who provides you with access to their account, you will gain access to the NetSuite Help Center and all relevant documentation.
Your options for integrating with the e-commerce platform depends on the exact platform. This ranges from Webhooks to HTTP requests.
You can't say NetSuite is delimiting developers in any way. It depends on how you look at it. As I see it, NetSuite provides two main method for developers - SuiteTalk and SuiteScript.By this, developer can create his/her own API, define what kind of acces those API should have.
SuiteTalk is SOAP based.
I would suggest using SuiteScript to create your own API using either NS RESTlet or NS Suitelet.
They have the feature for External URL. By sending request to this external URL you can trigger your own custom functions written on the SuiteScript. By SuiteScript, you can create your own API and define your own function. Ie, developer is in full control.
The only problem I see with NetSuite is its higher barrier for entry. There is no way you can access NetSuite Help Centre without having a Client/Partner/Test account.
But obviously, those who need some kind of integration with NetSuite have NS account.

Python create an SDK instead just an API

I have a project developed in python/django, i create my API interface for public a view of the db to my clients using POST GET and others calls, all done.
Now i'am wondering what is the best way to create a real SDK for my program, i mean the possibility for my clients, using specific calls, to make my enviroment execute something and return result from their code.
Are there some tools, like for example Django REST framework for the API, also for SDKs?
Thanks at all in advance
API is server side while SDK is client side.
For example, you can provide APIs using python/django. But your customers can use nodejs, C++, C#, JAVA... anything they want to communicate with your server.
If you provide a SDK for C++, that's just for C++ customers. For JAVA customers, you still need to provide another SDK for JAVA.
So in short, you cannot find a cross-language-sdk-generator.

Is there an AWS Auth v4 implementation usable with a Twisted-friendly HTTP client?

I'm looking to do some Route53 interaction within a Twisted-based program. I'm extending txAWS to support Route53 and looking at how to authenticate the requests. txAWS some some rudimentary signature code but it looks like it will take a lot of work to make it usable for a new set of APIs.
boto3 includes an implementation of the various authentication systems - but ties it closely to the http library it uses internally (requests). I could probably construct some kind of adapter between the two interfaces to be able to use this code, but ...
Has anyone else implemented (and open sourced) AWS Auth v2 in a way that makes it easily reusable by a Twisted-based HTTP client?

Is google cloud storage object versioning compatible with appengine cloud storage client library?

I am looking to back up user-generated data (user profiles, that may change from time to time) from my AppEngine python application into Google Cloud Storage. I could easily periodically brute-force back up all of the user-generated data, but it probably makes more sense to only update data that has changed (only writing it to the cloud storage if the user has changed their data). Later, in the case that data needs to be restored, I would like to take advantage of the object-versioning functionality of the Cloud Storage service to determine which objects need to be restored.
I am trying to understand exactly how the google cloud storage interacts with AppEngine based on the information regarding cloudstorage.open() found at https://developers.google.com/appengine/docs/python/googlecloudstorageclient/functions. However, there is no indication of how this service interacts with versioned objects that are stored in the cloud (versioned objects are documented here: https://developers.google.com/storage/docs/object-versioning).
So, my question is: how can an application running on the AppEngine access specific versions of objects that are stored in Google Cloud Storage.
If there is a better way of doing this, I would be interested in hearing about it as well.
The AppEngine GCS Client Library doesn't support versioning at this time. If you enable versioning on a bucket through other channels, the GCS Client Library will keep working fine, but in order to access or delete older generations of objects, you'll need to use either the XML API or the JSON API (as opposed to the appengine-specific API). There is a Python client for the JSON API that works fine from within appengine, but you'll lose a few of appengine's niceties by using it. See https://developers.google.com/appengine/docs/python/googlecloudstorageclient/#gcs_rest_api for more details.
Here's a bit of info on how to use versioning from the XML and JSON APIs: https://developers.google.com/storage/docs/generations-preconditions

Google Apps Python provisioning API & OAuth mess

I'm trying to provision (among other things) groups for our Google Apps domain, using python. I'm also attempting to using OAuth to authorise my application. The API documentation for Python seems to be missing or broken links. But from searching through the code, it seems I can't use the new (GDClient) APIs as (among other things) I can't get a list of group owners (which I can do in the older GDataService API). And the API for group settings seems to be either the old GDataService, or the even newer apiclient API, but I can't perform basic group provisioning using that API. So it seems I'm stuck using the GDataService API. However, I can't get my head around how to use OAuth for GDataService objects - I can create an oauth token using oauth2client, but can't authorise a GDataService object using this token.
Any pointers as to where to go from here? I'm struggling to believe how messy this all is
The provisioning API is still on the older GDataService API. It is being replaced by the new API called directory api (check out here https://developers.google.com/admin-sdk/)
If you just want to at least get start and familiar with the OAuth flow. You should check out this documentation for the Python API client library: https://developers.google.com/api-client-library/python/start/installation
Try the quick start. All you have to do is select the API you want to use, and select the platform (I usually just picked command line). Click 'Configure Project'. Make sure you are already logged in you Google Apps account that you used to create your project in API console. Select your API project and then finally download the whole package.
Remember to replace your client secret file and just run the sample python code. It will do all the OAuth flow for you.

Categories

Resources