Comments (13)
Hi, for those who are stuck on this. Please try https://github.com/tylerlong/ringcentral-python. It doesn't prepend anything to the url you specified. It is unofficial. And I only recommend it as a temporary workaround before the official SDK fix this issue.
from ringcentral-python.
This SDK is intended to be used with RingCentral, that's why all URLs are prefixed. Are you using it with a different backend?
from ringcentral-python.
The RingCentral SCIM API in beta and is rooted at /scim/v2
. For example:
https://platform.devtest.ringcentral.com/scim/v2/Users
The SCIM API is in the API Reference and accessible via Postman, both shown below.
A generic way to support this may be to prepend restapi/v1.0
only with partial URLs without a leading slash? For example:
platform.get("/scim/v2/Users")
becomeshttps://platform.devtest.ringcentral.com/scim/v2/Users
platform.get("account/~")
becomeshttps://platform.devtest.ringcentral.com/restapi/v1.0/account/~
API Reference:
https://developer.ringcentral.com/api-docs/latest/index.html#!#RefScim.html
Postman:
from ringcentral-python.
I don't think that it's a good idea to change logic of slash handling. Instead, I can add a /scim/
prefix handler.
from ringcentral-python.
I like the idea of changing the slash handling logic because it's a more generic and easily understandable approach where a leading slash means a base path. This is how the ringcentral_sdk
Ruby gem is implemented.
That being said, it is a breaking change here, so special /scim/
handling may be the way to go for a minor release.
from ringcentral-python.
It's a breaking change, so it's a no go. Unless we want to release a new major version. But for such change major version is a bit too much.
from ringcentral-python.
Yeah, let's stay at a minor version update for now.
We can considering changing for the next major upgrade. The benefit will be that the SDK will be ready to support future endpoints like this, but it does mean changing URLs.
from ringcentral-python.
Given the need to support the https://platform.ringcentral.com/rcvideo/v1
endpoint now per the following pull request, I think we should move to a major version release and generically fix this issue. It will be a breaking change, but it will ensure the SDK generically works for upcoming APIs.
from ringcentral-python.
Here is another proposal presented for this:
- Allow leading slashes to mean root, except when known
/restapi/v1.0
endpoints are used, then prepend/restapi/v1.0
.
This approach accomplishes two goals:
- Supports expected behavior
- Does not break backward compatibility
Expected behavior allows us to use the following principles:
- POLA - Priciple of Least Astonishment: https://en.wikipedia.org/wiki/Principle_of_least_astonishment
- DWIM - Do What I Mean: https://en.wikipedia.org/wiki/DWIM
The following path parts exist under /restapi/v1.0
today:
account
client-info
dictionary
glip
number-parser
subscription
Of note, we also have the following endpoints:
/restapi/{version}
/restapi/v1.0
from ringcentral-python.
Nice proposal, but it's not safe. If a new endpoint will be introduced and used under /restapi/v1.0
then behavior will be inconsistent. Imagine the astonishment in this case. Since /restapi/v1.0
for now is the main entry point I think we should be very careful.
from ringcentral-python.
Both of the proposals that provide special processing for specific URL paths are less ideal because when new affected APIs are released, a new SDK will need to be released with a code change and/or documentation change. We rebuild statically-typed language SDKs for each release, so either approach would also require this SDK to be reviewed per-release. The advantage of allowing a leading slash to default to root is that it is DWIM (Do What I Mean) and more POLA (Principle of Least Astonishment) because of that.
That being said, the simplest, cleanest, and most easily-understood solution to avoid a major version release may be to add a SDK constructor and/or request parameter that simply disables URL-building magic (similar to how a leading slash often behaves). This won't impact back-compat since it's a new, optional parameter. This solution is more maintainable and easier to understand because there's no need to keep track of URL paths for special treatment per release, in the code and/or documentation.
from ringcentral-python.
Regarding a major version release, I think releasing a major version bump is a good idea if we intend to treat this as a production GA SDK, which there seems to be some desire to do here. This will also result in the cleanest implementation.
The original stated goal of keeping this a sub-1.0 release was to keep flexibility for making breaking changes. If this is no longer the case and we want to treat this as a production GA release, we should bump the version to 1.0 to communicate this, at which time we can also introduce the leading slash at root breaking change behavior.
The advantages of making a breaking change and bumping the major version are:
- it provides a cleaner DWIM/POLA URL behavior
- it better communicates the status of this SDK
For a 1.0 release, we should also add Authorization Code flow support websites and bot apps as well as to be inline with other official RingCentral SDKs as described here:
I don't think we need many other changes for a major version bump to 1.0 because this is really to communicate moving from beta to GA. We've had this SDK available for a while and if we want to treat it as GA, we should communicate it as such.
from ringcentral-python.
Released 0.7.8 with the quick fix. Now since the issue is fixed we can discuss what else we want in 1.0.0 or any other update. Developers are now unblocked and can start using the feature, no impact on existing users.
from ringcentral-python.
Related Issues (20)
- It doesn't support authorization code flow HOT 5
- 0.7.8 fails to install via pip - missing requirements.txt HOT 4
- multipart/mixed request support HOT 2
- Update to use `X-User-Agent` header
- Refresh token has expired exception trying to send SMS HOT 1
- Cannot support Python 2.x HOT 3
- Add simple SMS example to README HOT 1
- Return ringcentral error code HOT 1
- TypeError: not a valid non-string sequence or mapping object HOT 1
- Need a simple and documented way to set auth token
- Install Failing - pip install ringcentral on Python 3.8.1 HOT 1
- Can we get a sample Credentials.ini file that could be used. HOT 1
- Using the SDK in background tasks
- pip 2.7 doesn't work HOT 1
- how set a parameter in SDK builder to not send coverpage HOT 1
- issue with fax attachments in sandbox with python SDK HOT 1
- Do not specify default "Accept" header HOT 1
- CloudQuery RingCentral Plugin?
- error sending fax HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ringcentral-python.