Skip to content

RushCode/m1-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M1 API

Build Status Code Climate Scrutinizer Code Quality Code Coverage

About this class

This is a PHP7 API implementation for M1 Messenger

Installation

Add the following to your composer.json:

{
  "require": {
    "leocata/m1-api": "^1.0"
  }
}

General usage

Send request to Server

$connect = new Api();
$connect->sendRequest($method);

Api methods

Session

  • getSessions
  • getSessionList
  • createSession
  • updateSession
  • closeSession

Message

  • getMessages
  • sendMessage
  • message
  • deleteMessage
  • messageDeleted
  • messageDelivered
  • delivery
  • messageTyped

State

  • Set state
$state = new \leocata\M1\Methods\Request\SetState();
$state->online();
(new Api())->sendRequest($state);

Contact

  • findContact
  • inviteContact
  • contactRequested
  • contactAccept
  • contactAccepted
  • contactReject
  • contactRejected
  • deleteContact
  • updateContact
  • getContacts

UserInfo

  • getUserInfo
  • setUserInfo

Packages

No packages published

Languages