Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox API testing #26

Closed
newbro opened this issue Mar 30, 2016 · 5 comments
Closed

Sandbox API testing #26

newbro opened this issue Mar 30, 2016 · 5 comments
Assignees

Comments

@newbro
Copy link

newbro commented Mar 30, 2016

Would it be possible to add a way to override the default host for the api call? Since for testing phase we need to make api call to sandbox.orcid.org

@spwilson806
Copy link
Contributor

Yeah, that shouldn't be a problem at all. It's been some time since I read their documentation. They use api.orcid.org for their members api and pub.orcid.org for their public api. Do you know if there is a corollary for testing, or is it all just sandbox.orcid.org?

@spwilson806
Copy link
Contributor

Never mind, I found the info that I was looking for (http://members.orcid.org/api/tokens-through-3-legged-oauth-authorization, at the very bottom of the page).

@newbro
Copy link
Author

newbro commented Mar 30, 2016

If i understand it right, sandbox.orcid.org is just a testing platform for their members api. So I guess adding the follow in Oauth class would suffice:
public function useSandboxApi() { $this->level = 'sandbox'; return $this; }

@spwilson806
Copy link
Contributor

Yep, I'll do that. Thanks!

spwilson806 added a commit that referenced this issue Mar 30, 2016
[#26] Add support for setting the environment (whether production or sandbox)
@spwilson806
Copy link
Contributor

This should be resolved in release v0.2, which is now out. I don't actually have a sandbox account for ORCID, so please let me know if you run into any issues. The documentation has also been updated to highlight the added functionality.

As a brief overview, you can now call useSandboxEnvironment(). Note that this is not mutually exclusive to the usePublicApi() and useMemberApi() methods, as they serve different purposes (i.e. the sandbox environment also has a members and public api).

Hope that helps. Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants