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

Support additional API hosts #684

Closed
1 task
abraham opened this issue Jul 3, 2018 · 4 comments
Closed
1 task

Support additional API hosts #684

abraham opened this issue Jul 3, 2018 · 4 comments
Milestone

Comments

@abraham
Copy link
Owner

abraham commented Jul 3, 2018

Twitter has since added a number of additional hosts that are used and they need to be supported.

A potential design could look something like this:

$twitteroauth->subdomain('version').method('path', params);

$t->api->get(...); // https://api.twitter.com/1.1
$t->api('1.1')->get(...); // https://api.twitter.com/1.1
$t->api('labs/1')->get(...); // https://api.twitter.com/labs/1
$t->dataApi->post(...); // https://data-api.twitter.com
$t->upload->post(...); // https://upload.twitter.com
$t->adsApi->post(...); // https://ads-api.twitter.com/7
$t->gnipApi->post(...); // https://ads-api.twitter.com
$t->oauth->get(...); // https://oauth.twitter.com
$t->ton->get(...); // https://oauth.twitter.com
$t->stream->get(...); // https://stream.twitter.com
$t->gnipStream->get(...); // https://gnip-stream.twitter.com

Methods to support

  • GET
  • POST
  • DELETE
  • PUT

Authentication to support

  • oauth 1
  • oauth 2
  • basic auth

Payload types to support

  • json
  • html form
  • media

TODO:

  • Audit Twitter docs for all the hosts that need to be tested.
@hiranipradeep
Copy link

Hello Abraham,

Thanks a lot for your effort for adding additional hosts.
I want data-api.twitter.com for impression count, so may I know when we got the updated package.

Thanks

@dpereiraegoi
Copy link

This will be great! When we can have this?

@abraham
Copy link
Owner Author

abraham commented Jul 19, 2021

It's not officially supported but you can override apiUrl in 3.1.0 and later which will allow custom API hosts.

@abraham
Copy link
Owner Author

abraham commented Jul 24, 2023

TwitterOAuth is in maintenance mode and major improvements are no longer planned. #1188

@abraham abraham closed this as completed Jul 24, 2023
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

3 participants