@@ -20,144 +20,21 @@ if you don't use Composer.
2020use Seven\Api\Client;
2121use Seven\Api\Params\SmsParams;
2222$client = new Client('MY_VERY_SECRET_API_KEY!');
23- $params = new SmsParams();
24- $client->sms($params
25- ->setTo('+4901234567890')
26- ->setText('HI2U'));
23+ $params = new SmsParams('HI2U', '+4901234567890');
24+ $client->sms($params);
2725```
2826
29- #### Methods
30-
31- <details >
32- <summary >Analytics</summary >
33-
34- <ul >
35- <li>analytics(array options = [], string $groupBy = 'date'): AbstractAnalytic[]</li>
36- <li>analyticsByCountry(array options = []): AnalyticByCountry[]</li>
37- <li>analyticsByDate(array options = []): AnalyticByDate[]</li>
38- <li>analyticsByLabel(array options = []): AnalyticByLabel[]</li>
39- <li>analyticsBySubaccount(array options = []): AnalyticBySubaccount[]</li>
40- </ul >
41- </details >
42-
43- <details >
44- <summary >Balance</summary >
45-
46- <ul >
47- <li>balance(bool $json = false): float|Balance</li>
48- <li>balanceFloat(): float</li>
49- <li>balanceJson(): Balance</li>
50- </ul >
51- </details >
52-
53- <details >
54- <summary >Contacts</summary >
55-
56- <ul >
57- <li>contacts(string $action, array $options = []): mixed</li>
58- <li>createContact(bool $json = false): string|ContactCreate</li>
59- <li>createContactJson(): ContactCreate</li>
60- <li>deleteContact(int $id, bool $json = false): int|ContactDelete</li>
61- <li>deleteContactJson(int $id): ContactDelete</li>
62- <li>editContact(array $options): int|ContactEdit</li>
63- <li>editContactJson(array $options): ContactEdit</li>
64- <li>getContact(int $id, bool $json = false): string|Contact[]</li>
65- <li>getContactJson(int $id): Contact[]</li>
66- <li>getContacts(bool $json = false): string|Contact[]</li>
67- <li>getContactsJson(): Contact[]</li>
68- </ul >
69- </details >
70-
71- <details >
72- <summary >Hooks</summary >
73-
74- <ul >
75- <li>hooks(string $action, array $options = []): mixed</li>
76- <li>getHooks(): Hooks</li>
77- <li>subscribeHook(string $target_url, string $event_type, string $request_method = HooksConstants::REQUEST_METHOD_DEFAULT): HookAction</li>
78- <li>unsubscribeHook(?int $id, ?string $target_url = null, ?string $event_type = null, ?string $request_method = null): HookAction</li>
79- </ul >
80- </details >
81-
82- <details >
83- <summary >Journal</summary >
84-
85- <ul >
86- <li>journal(string $type, array $options = []): JournalBase[]</li>
87- <li>journalInbound(array $options = []): JournalInbound[]</li>
88- <li>journalOutbound(array $options = []): JournalOutbound[]</li>
89- <li>journalReplies(array $options = []): JournalReplies[]</li>
90- <li>journalVoice(array $options = []): JournalVoice[]</li>
91- </ul >
92- </details >
93-
94- <details >
95- <summary >Lookup</summary >
96-
97- <ul >
98- <li>lookup(string $type, string $number, array $options = []): mixed</li>
99- <li>lookupFormat(string $number): LookupFormat</li>
100- <li>lookupCnam(string $number): LookupCnam</li>
101- <li>lookupHlr(string $number): LookupHlr</li>
102- <li>lookupMnp(string $number, bool $json = false): string|LookupMnp</li>
103- <li>lookupMnpJson(string $number): LookupMnp</li>
104- </ul >
105- </details >
106-
107- <details >
108- <summary >Pricing</summary >
109-
110- <ul >
111- <li>pricing(bool $json = true, string $country = ''): string|Pricing</li>
112- <li>pricingCsv(string $country = ''): string</li>
113- </ul >
114- </details >
115-
116- <details >
117- <summary >SMS</summary >
118-
119- <ul >
120- <li>sms(SmsParamsInterface $params): string|Sms</li>
121- <li>smsJson(SmsParamsInterface $params): Sms</li>
122- </ul >
123- </details >
124-
125- <details >
126- <summary >Status</summary >
127-
128- <ul >
129- <li>status(int $msgId, bool $json = false): string|Status</li>
130- <li>statusJson(int $msgId): Status</li>
131- </ul >
132- </details >
133-
134- <details >
135- <summary >Validate for Voice</summary >
136-
137- <ul >
138- <li>validateForVoice(string $number, array $opts = []): ValidateForVoice</li>
139- </ul >
140- </details >
141-
142- <details >
143- <summary >Voice</summary >
144-
145- <ul >
146- <li>voice(VoiceParamsInterface $p): string|Voice</li>
147- <li>voiceJson(VoiceParamsInterface $p): Voice</li>
148- </ul >
149- </details >
27+ See [ docs] ( /docs ) for more details.
15028
15129##### Tests
15230
153- Some basic tests are implemented. Run them like this:
31+ Some basic tests are implemented. You can run them like this:
15432
15533``` shell script
156- SEVEN_API_KEY= SEVEN_RECIPIENT= SEVEN_MSG_ID= php vendor/bin/phpunit tests/Client
34+ SEVEN_API_KEY=< API-KEY > php vendor/bin/phpunit tests/Client
15735```
15836
159- Make sure to fill in the values. SEVEN_MSG_ID refers to a message ID sent from this
160- particular API key. SEVEN_RECIPIENT is the recipient of the test SMS.
37+ Make sure to fill in the values.
16138
16239###### Support
16340
0 commit comments