Skip to content

Commit

Permalink
feat: Add filters by created_at field (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
allisson committed Mar 10, 2021
1 parent 4880887 commit ae19cda
Show file tree
Hide file tree
Showing 11 changed files with 357 additions and 92 deletions.
102 changes: 87 additions & 15 deletions docs/docs.go
Expand Up @@ -41,27 +41,49 @@ var doc = `{
"type": "integer",
"description": "The limit indicates the maximum number of items to return",
"name": "limit",
"in": "query",
"required": true
"in": "query"
},
{
"type": "integer",
"description": "The offset indicates the starting position of the query in relation to the complete set of unpaginated items",
"name": "offset",
"in": "query",
"required": true
"in": "query"
},
{
"type": "string",
"description": "Filter by webhook_id",
"description": "Filter by webhook_id field",
"name": "webhook_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"description": "Filter by status field",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than this value",
"name": "created_at.gt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than or equal to this value",
"name": "created_at.gte",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than this value",
"name": "created_at.lt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than or equal to this value",
"name": "created_at.lte",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -221,15 +243,13 @@ var doc = `{
"type": "integer",
"description": "The limit indicates the maximum number of items to return",
"name": "limit",
"in": "query",
"required": true
"in": "query"
},
{
"type": "integer",
"description": "The offset indicates the starting position of the query in relation to the complete set of unpaginated items",
"name": "offset",
"in": "query",
"required": true
"in": "query"
},
{
"type": "string",
Expand All @@ -244,10 +264,34 @@ var doc = `{
"in": "query"
},
{
"type": "string",
"type": "boolean",
"description": "Filter by success",
"name": "success",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than this value",
"name": "created_at.gt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than or equal to this value",
"name": "created_at.gte",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than this value",
"name": "created_at.lt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than or equal to this value",
"name": "created_at.lte",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -326,15 +370,43 @@ var doc = `{
"type": "integer",
"description": "The limit indicates the maximum number of items to return",
"name": "limit",
"in": "query",
"required": true
"in": "query"
},
{
"type": "integer",
"description": "The offset indicates the starting position of the query in relation to the complete set of unpaginated items",
"name": "offset",
"in": "query",
"required": true
"in": "query"
},
{
"type": "boolean",
"description": "Filter by active field",
"name": "active",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than this value",
"name": "created_at.gt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than or equal to this value",
"name": "created_at.gte",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than this value",
"name": "created_at.lt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than or equal to this value",
"name": "created_at.lte",
"in": "query"
}
],
"responses": {
Expand Down
102 changes: 87 additions & 15 deletions docs/swagger.json
Expand Up @@ -25,27 +25,49 @@
"type": "integer",
"description": "The limit indicates the maximum number of items to return",
"name": "limit",
"in": "query",
"required": true
"in": "query"
},
{
"type": "integer",
"description": "The offset indicates the starting position of the query in relation to the complete set of unpaginated items",
"name": "offset",
"in": "query",
"required": true
"in": "query"
},
{
"type": "string",
"description": "Filter by webhook_id",
"description": "Filter by webhook_id field",
"name": "webhook_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"description": "Filter by status field",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than this value",
"name": "created_at.gt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than or equal to this value",
"name": "created_at.gte",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than this value",
"name": "created_at.lt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than or equal to this value",
"name": "created_at.lte",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -205,15 +227,13 @@
"type": "integer",
"description": "The limit indicates the maximum number of items to return",
"name": "limit",
"in": "query",
"required": true
"in": "query"
},
{
"type": "integer",
"description": "The offset indicates the starting position of the query in relation to the complete set of unpaginated items",
"name": "offset",
"in": "query",
"required": true
"in": "query"
},
{
"type": "string",
Expand All @@ -228,10 +248,34 @@
"in": "query"
},
{
"type": "string",
"type": "boolean",
"description": "Filter by success",
"name": "success",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than this value",
"name": "created_at.gt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than or equal to this value",
"name": "created_at.gte",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than this value",
"name": "created_at.lt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than or equal to this value",
"name": "created_at.lte",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -310,15 +354,43 @@
"type": "integer",
"description": "The limit indicates the maximum number of items to return",
"name": "limit",
"in": "query",
"required": true
"in": "query"
},
{
"type": "integer",
"description": "The offset indicates the starting position of the query in relation to the complete set of unpaginated items",
"name": "offset",
"in": "query",
"required": true
"in": "query"
},
{
"type": "boolean",
"description": "Filter by active field",
"name": "active",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than this value",
"name": "created_at.gt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is greater than or equal to this value",
"name": "created_at.gte",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than this value",
"name": "created_at.lt",
"in": "query"
},
{
"type": "string",
"description": "Return results where the created_at field is less than or equal to this value",
"name": "created_at.lte",
"in": "query"
}
],
"responses": {
Expand Down

0 comments on commit ae19cda

Please sign in to comment.