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

Remove the requirement for both $Resource and $ResourceURL parameters #9

Closed
mkellerman opened this issue Jan 25, 2019 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@mkellerman
Copy link
Owner

In the function Invoke-TwitterAPI, we require 2 parameters:

Name Example
$Resource /statuses/update
$ResourceUrl https://api.twitter.com/1.1/statuses/update.json

$Resource is used to find the RateLimitStatus on that resource. And $ResourceUrl is used to build the OAuthSettings.

But some resources are like this:

    [string]$Resource    = '/geo/id/:place_id'
    [string]$ResourceUrl = 'https://api.twitter.com/1.1/geo/id/:place_id.json'

And I need to replace :place_id in the ResourceUrl with the actual value of the place_id parameter.

    [string]$ResourceUrl = https://api.twitter.com/1.1/geo/id/df51dec6f4ee2b2c.json

I suspect that I will need to generate the $Resource from the $ResourceUrl.
If I don't find a resource with the full text, then look for partial match.

I would like to have to only supply one parameter, so less parameters are required to do manual Invoke-TwitterAPI commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant