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

Offer createKey() to register a new API key. #9

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

rolftimmermans
Copy link
Contributor

No description provided.

@peter279k
Copy link

Mm.....This commits are too long to read. It should squash them to the less commits when merging this PR.

…compression count, paying state and email address when they are returned from validate() calls.
private static $client = NULL;

public static function setKey($key) {
self::$key = $key;
self::$client = NULL;
}

public static function getKey() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should use PHP_CodeSniffer or php-cs-fixer to fix PSR-2 coding style.

function emailAddress() {
return Tinify::getEmailAddress();
}

Copy link

@peter279k peter279k Nov 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods are very strange.

They looks similar. The duplicate should be removed.

@element-code
Copy link

Would love to see this in production!
Also it would help to have some PHP Docs which state clearly which return values are possible.

I got two quick questions:

  1. Which value to expect when the account is using a paid plan and im calling Tinify\remainingCredits()?
  2. Is paid the return value of Tinify\payingState() when the account is using a paid plan?

@simonwahlstrom
Copy link

Hi there!

Once we have implemented the same logic for the other libraries we will put this into production and update the documentation.

  • Which value to expect when the account is using a paid plan and im calling Tinify\remainingCredits()?
  • Is paid the return value of Tinify\payingState() when the account is using a paid plan?
  1. If the user is on a paid plan the value will be null. If not then it will be a value between 0 and 500

  2. The value will be either "free" or "paying".

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.

None yet

6 participants