Skip to content

ChatAPI functionality #23

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

Merged
merged 19 commits into from
Aug 15, 2016
Merged

ChatAPI functionality #23

merged 19 commits into from
Aug 15, 2016

Conversation

sotoz
Copy link
Contributor

@sotoz sotoz commented Jul 25, 2016

Added actions for Chat API.

  • Chat Channels Create/Delete/Update/List all/View one
  • Chat Contacts Create/Delete/List all/View one
  • Chat Messages Create/List all/View one
  • Chat Platforms List all

Created examples for every needed action.

@samwierema
Copy link
Contributor

My first instinct is that I would separate all Chat API-related objects and resources into their own sub-namespace. So where it's now MessageBird\Objects\ChatChannel I would feel we should make clear it's a separate API (and can thus behave differently) by putting it in it's sub-namespace, e.g.: MessageBird\Objects\Chat\Channel.

@bviolier
Copy link
Contributor

I agree with @samwierema

@sotoz
Copy link
Contributor Author

sotoz commented Aug 11, 2016

Should we do it only for the Chat related objects?

@samwierema
Copy link
Contributor

@sotoz yes, everything else should remain in place.


require_once(__DIR__ . '/../autoload.php');

$MessageBird = new \MessageBird\Client('YOUR_ACCESS_KEY '); // Set your own API access key here.
Copy link
Contributor

Choose a reason for hiding this comment

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

Dummy access key contains tab character.

@dstotijn
Copy link
Contributor

Please also check for double newlines (maybe run phpcs with PSR2)?

Removed tab character from dummy access key
@@ -11,6 +11,7 @@ class Client
{

const ENDPOINT = 'https://rest.messagebird.com';
const CHATAPI_ENDPOINT = 'https://chat.messagebird.com/1';

const CLIENT_VERSION = '1.4.1';
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be updated during release somehow?

@gedimin45
Copy link
Contributor

no example to create contacts?

@sotoz
Copy link
Contributor Author

sotoz commented Aug 15, 2016

platformId will be corrected.
Example for creating contacts not needed. Contacts are being created automatically when the first message arrives.

@gedimin45 gedimin45 merged commit 8ba37eb into messagebird:master Aug 15, 2016
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.

5 participants