Add support for get_traffic/GetTraffic #38
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Heya, have hacked this together. Forgive me if I've done it 'the wrong way' but it seems to work. Docs I referenced are at http://download1.parallels.com/Plesk/PP12/12.0/Doc/fr-FR/online/plesk-api-rpc/index.htm?fileName=33929.htm
Pass it one of ['name', 'owner-id', 'owner-login', 'guid', 'id']
And optionally either or both of since_date/to_date. You can see what I mean in examples/get_traffic.php
"Dates" are simple strings, YYYY-MM-DD. Not sure if it should accept/return this and/or a DateTime object instead.
Also not sure if the GetTraffic class should override BaseRequest's checkResponse method to check error_code/error_text in the response... Doesn't look like any of the other classes do this.