This repository was archived by the owner on Feb 5, 2024. It is now read-only.
forked from gorkalaucirica/HipchatAPIv2Client
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathUserAPIInterface.php
More file actions
106 lines (95 loc) · 3.5 KB
/
Copy pathUserAPIInterface.php
File metadata and controls
106 lines (95 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/**
* Created by solutionDrive GmbH.
*
* @author: Tobias Lückel <tl@solutionDrive.de>
* @date: 01.12.17
* @time: 13:09
* @copyright: 2017 solutionDrive GmbH
*/
namespace SolutionDrive\HipchatAPIv2Client\API;
use SolutionDrive\HipchatAPIv2Client\Model\MessageInterface;
use SolutionDrive\HipchatAPIv2Client\Model\UserInterface;
interface UserAPIInterface
{
/**
* List all users in the group
* More info: https://www.hipchat.com/docs/apiv2/method/get_all_users
*
* @param array $parameters The following are accepted: start-index, max-results, include-guests, include-deleted
*
* @return array of Users
*/
public function getAllUsers($parameters = array());
/**
* Gets user by id, email or mention name
* More info: https://www.hipchat.com/docs/apiv2/method/view_user
*
* @param string $userId The id, email address, or mention name (beginning with an '@') of the user to view
*
* @return UserInterface
*/
public function getUser($userId);
/**
* Creates a new user
* More info: https://www.hipchat.com/docs/apiv2/method/create_user
*
* @param UserInterface $user User to be created
* @param string $password User's password
*
* @return mixed
*/
public function createUser(UserInterface $user, $password);
/**
* Update a user
* More info: https://www.hipchat.com/docs/apiv2/method/update_user
*
* @param UserInterface $user User to be updated
*/
public function updateUser(UserInterface $user);
/**
* Delete a user.
*
* @param string $userId The id, email address, or mention name (beginning with an '@') of the user to delete
*/
public function deleteUser($userId);
/**
* Sends a user a private message
* More info: https://www.hipchat.com/docs/apiv2/method/private_message_user
*
* @param string $userId The id, email address, or mention name (beginning with an '@') of the user to send a message to
* @param mixed $message The message to send as plain text
*/
public function privateMessageUser($userId, $message);
/**
* Fetch latest chat history for the 1:1 chat with the user
* More info: https://www.hipchat.com/docs/apiv2/method/view_recent_privatechat_history
*
* @param string $userId The id, email address, or mention name (beginning with an '@') of the user
* @param mixed $parameters Optional parameters, check above documentation for more info
*
* @return array Message
*/
public function getRecentPrivateChatHistory($userId, array $parameters = array());
/**
* Fetch one specific message by id
* More info: https://www.hipchat.com/docs/apiv2/method/get_privatechat_message
*
* @param string $user The id, email address, or mention name (beginning with an '@') of the user
* @param string $messageId The id of the message to retrieve
* @param array $parameters Optional parameters, check above documentation for more info
*
* @return MessageInterface
*/
public function getPrivateChatMessage($user, $messageId, array $parameters = array());
/**
* Gets a user photo
* More info: https://www.hipchat.com/docs/apiv2/method/get_photo
*
* @param string $userId The id, email address, or mention name (beginning with an '@') of the user
* @param string $size The size to retrieve ("small" or "big")
*
* @return array
*/
public function getPhoto($userId, $size);
}