Skip to content

Commit

Permalink
Merge pull request #134 from MohammadWaleed/feature-delete-collection
Browse files Browse the repository at this point in the history
Implement delete collection by name
  • Loading branch information
piotrek-buchman authored Oct 23, 2018
2 parents 3767bf3 + c87a0f2 commit d1e1f94
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change Log
==========

VERSION 2.6.0
-------------
* Added collection deletion - added collection deletion by name

VERSION 2.5.14
-------------
* Updated README.md - added basic info regarding local development setup
Expand Down
3 changes: 2 additions & 1 deletion src/Client/KeenIOClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*
* @method array getCollection(string $eventCollection, array $args = array()) {@command KeenIO getCollection}
* @method array getCollections(array $args = array()) {@command KeenIO getCollections}
* @method array deleteCollection(array $args = array()) {@command KeenIO getProperty} *
* @method array getResources(array $args = array()) {@command KeenIO getResources}
* @method array getProjects(array $args = array()) {@command KeenIO getProjects}
* @method array getProject(array $args = array()) {@command KeenIO getProject}
Expand Down Expand Up @@ -41,7 +42,7 @@
class KeenIOClient extends GuzzleClient
{

const VERSION = '2.5.14';
const VERSION = '2.6.0';

/**
* Factory to create new KeenIOClient instance.
Expand Down
25 changes: 25 additions & 0 deletions src/Client/Resources/keen-io-3_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,31 @@
),
),

'deleteCollection' => array(
'uri' => 'projects/{projectId}/events/{collection_name}',
'description' => 'Deletes the specified collection.',
'httpMethod' => 'DELETE',
'parameters' => array(
'projectId' => array(
'location' => 'uri',
'type' => 'string'
),
'masterKey' => array(
'location' => 'header',
'description' => 'The Master API Key.',
'sentAs' => 'Authorization',
'pattern' => '/^([[:alnum:]])+$/',
'type' => 'string',
'required' => true,
),
'collection_name' => array(
'location' => 'uri',
'description' => 'The collection name.',
'required' => true,
),
),
),

'getProperty' => array(
'uri' => 'projects/{projectId}/events/{event_collection}/properties/{property_name}',
'description' => 'GET returns the property name, type, and a link to sub-resources.',
Expand Down

0 comments on commit d1e1f94

Please sign in to comment.