Skip to content

Fixes and improvements #8

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

inorganik
Copy link

  • Separated the library (functions) from the testing, so functions can
    be tested one at a time, and so a dev can include Oauth.php in a
    project without having to remove test lines at the end. Simple testing
    page added which includes the library.
  • Allow author to specify their own app name instead of "jonhurlock
    Twitter Application-only OAuth App v.1". Because it is the author's
    app, they are using jonhurlock's library in their app.
  • Retrieve http code AFTER you make the curl request
  • For consistency and readability, under "get_bearer_token()",
    "$bearer_token" and "$base64_encoded_bearer_token" variable name
    changed to match other functions, and because they are not bearer
    tokens.
  • Content-length header is unnecessary, it is added automatically
  • adding '.""' after a variable in $headers array is unnecessary
  • remove "$header" variable before curl option declaration, unnecessary
  • "invalidate_bearer_token()" and "search_for_a_term()" return a php
    associative array instead of raw http data.

	⁃	Separated the library (functions) from the testing, so functions can
be tested one at a time, and so a dev can include Oauth.php in a
project without having to remove test lines at the end. Simple testing
page added which includes the library.
	⁃	Allow author to specify their own app name instead of "jonhurlock
Twitter Application-only OAuth App v.1". Because it is the author's
app, they are using jonhurlock's library in their app.
	⁃	Retrieve http code AFTER you make the curl request
	⁃	For consistency and readability, under "get_bearer_token()",
"$bearer_token" and "$base64_encoded_bearer_token" variable name
changed to match other functions, and because they are not bearer
tokens.
	⁃	Content-length header is unnecessary, it is added automatically
	⁃	adding '.""' after a variable in $headers array is unnecessary
	⁃	remove "$header" variable before curl option declaration, unnecessary
	⁃	"invalidate_bearer_token()" and "search_for_a_term()" return a php
associative array instead of raw http data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant