Skip to content

Commit d1e1f94

Browse files
Merge pull request #134 from MohammadWaleed/feature-delete-collection
Implement delete collection by name
2 parents 3767bf3 + c87a0f2 commit d1e1f94

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

CHANGE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Change Log
22
==========
33

4+
VERSION 2.6.0
5+
-------------
6+
* Added collection deletion - added collection deletion by name
7+
48
VERSION 2.5.14
59
-------------
610
* Updated README.md - added basic info regarding local development setup

src/Client/KeenIOClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*
1515
* @method array getCollection(string $eventCollection, array $args = array()) {@command KeenIO getCollection}
1616
* @method array getCollections(array $args = array()) {@command KeenIO getCollections}
17+
* @method array deleteCollection(array $args = array()) {@command KeenIO getProperty} *
1718
* @method array getResources(array $args = array()) {@command KeenIO getResources}
1819
* @method array getProjects(array $args = array()) {@command KeenIO getProjects}
1920
* @method array getProject(array $args = array()) {@command KeenIO getProject}
@@ -41,7 +42,7 @@
4142
class KeenIOClient extends GuzzleClient
4243
{
4344

44-
const VERSION = '2.5.14';
45+
const VERSION = '2.6.0';
4546

4647
/**
4748
* Factory to create new KeenIOClient instance.

src/Client/Resources/keen-io-3_0.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,31 @@
297297
),
298298
),
299299

300+
'deleteCollection' => array(
301+
'uri' => 'projects/{projectId}/events/{collection_name}',
302+
'description' => 'Deletes the specified collection.',
303+
'httpMethod' => 'DELETE',
304+
'parameters' => array(
305+
'projectId' => array(
306+
'location' => 'uri',
307+
'type' => 'string'
308+
),
309+
'masterKey' => array(
310+
'location' => 'header',
311+
'description' => 'The Master API Key.',
312+
'sentAs' => 'Authorization',
313+
'pattern' => '/^([[:alnum:]])+$/',
314+
'type' => 'string',
315+
'required' => true,
316+
),
317+
'collection_name' => array(
318+
'location' => 'uri',
319+
'description' => 'The collection name.',
320+
'required' => true,
321+
),
322+
),
323+
),
324+
300325
'getProperty' => array(
301326
'uri' => 'projects/{projectId}/events/{event_collection}/properties/{property_name}',
302327
'description' => 'GET returns the property name, type, and a link to sub-resources.',

0 commit comments

Comments
 (0)