diff --git a/bruno/Joomla Web Services API/Banners Categories/Add Category.bru b/bruno/Joomla Web Services API/Banners Categories/Add Category.bru deleted file mode 100644 index f0831aa..0000000 --- a/bruno/Joomla Web Services API/Banners Categories/Add Category.bru +++ /dev/null @@ -1,67 +0,0 @@ -meta { - name: Add Category - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/banners/categories - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "alias": "", - "extension": "", - "language": "", - "note": "", - "params": { - "workflow_id": 0 - }, - "parent_id": 0, - "published": 0, - "title": "" - } -} - -example { - name: 200 Response (banners/categories) - description: todo: response object - - request: { - url: {{base_url}}/v1/banners/categories - method: POST - mode: json - body:json: { - { - "access": 1, - "alias": "category-alias", - "extension": "com_banners", - "language": "*", - "note": "", - "params": { - "workflow_id": 1 - }, - "parent_id": 1, - "published": 1, - "title": "A name for this Category" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Banners Categories/Update Banners Category.bru b/bruno/Joomla Web Services API/Banners Categories/Update Banners Category.bru deleted file mode 100644 index 03f5371..0000000 --- a/bruno/Joomla Web Services API/Banners Categories/Update Banners Category.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: Update Banners Category - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/banners/categories/{{category_id}} - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "note": "", - "parent_id": 0, - "title": "" - } -} - -example { - name: 200 Response (banners/categories/{category_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/banners/categories/{{category_id}} - method: PATCH - mode: json - body:json: { - { - "alias": "updated-category", - "note": "Updated note for this category.", - "parent_id": 1, - "title": "Updated Category name" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Banners Clients/Add Banners Client.bru b/bruno/Joomla Web Services API/Banners Clients/Add Banners Client.bru deleted file mode 100644 index ffdf079..0000000 --- a/bruno/Joomla Web Services API/Banners Clients/Add Banners Client.bru +++ /dev/null @@ -1,57 +0,0 @@ -meta { - name: Add Banners Client - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/banners/clients - body: json - auth: inherit -} - -body:json { - { - "contact": "", - "email": "", - "extrainfo": "", - "metakey": "", - "name": "", - "state": 0 - } -} - -example { - name: 200 Response (banners/clients) - description: todo: response object - - request: { - url: {{base_url}}/v1/banners/clients - method: POST - mode: json - body:json: { - { - "contact": "Some ContactpersonName", - "email": "somename@example.org", - "extrainfo": "Some extra info about this Banners Client.", - "metakey": "some keywords", - "name": "Name of client", - "state": 1 - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Banners Clients/Update Banners Client.bru b/bruno/Joomla Web Services API/Banners Clients/Update Banners Client.bru deleted file mode 100644 index 9207890..0000000 --- a/bruno/Joomla Web Services API/Banners Clients/Update Banners Client.bru +++ /dev/null @@ -1,51 +0,0 @@ -meta { - name: Update Banners Client - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/banners/clients/{{client_id}} - body: json - auth: inherit -} - -body:json { - { - "contact": "", - "email": "", - "name": "" - } -} - -example { - name: 200 Response (banners/clients/1) - description: todo: response object - - request: { - url: {{base_url}}/v1/banners/clients/{{client_id}} - method: PATCH - mode: json - body:json: { - { - "contact": "Updated ContactpersonName", - "email": "newemail@example.org", - "name": "Updated ClientName" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Banners/Add Banner.bru b/bruno/Joomla Web Services API/Banners/Add Banner.bru deleted file mode 100644 index 4402c66..0000000 --- a/bruno/Joomla Web Services API/Banners/Add Banner.bru +++ /dev/null @@ -1,70 +0,0 @@ -meta { - name: Add Banner - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/banners - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "catid": 0, - "clicks": 0, - "custombannercode": "", - "description": "", - "metakey": "", - "name": "", - "params": { - "alt": "", - "height": 0, - "imageurl": "", - "width": 0 - } - } -} - -example { - name: 200 Response (banners) - description: todo: response object - - request: { - url: {{base_url}}/v1/banners - method: POST - mode: json - body:json: { - { - "catid": 3, - "clicks": 0, - "custombannercode": "", - "description": "Some description of this Banner.", - "metakey": "some keywords", - "name": "Name for this Banner", - "params": { - "alt": "Managed user-facing alliance", - "height": 480, - "imageurl": "images/banners/banner.jpg", - "width": 640 - } - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Banners/Update Banner.bru b/bruno/Joomla Web Services API/Banners/Update Banner.bru deleted file mode 100644 index db9ac20..0000000 --- a/bruno/Joomla Web Services API/Banners/Update Banner.bru +++ /dev/null @@ -1,62 +0,0 @@ -meta { - name: Update Banner - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/banners/{{banner_id}} - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "catid": 0, - "clicks": 0, - "custombannercode": "", - "description": "", - "metakey": "", - "name": "", - "params": { - "alt": "", - "height": 0, - "imageurl": "", - "width": 0 - } - } -} - -example { - name: 200 Response (banners/1) - description: todo: response object - - request: { - url: {{base_url}}/v1/banners/{{banner_id}} - method: PATCH - mode: json - body:json: { - { - "alias": "updated-alias", - "catid": 3, - "description": "Updated description", - "name": "Updated name of the Banner" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id} (PATCH).bru b/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id} (PATCH).bru deleted file mode 100644 index f878398..0000000 --- a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: fields/contacts/categories/{field_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/fields/contacts/categories/{{field_id}} - body: json - auth: inherit -} - -body:json { - { - "default_value": "", - "description": "", - "label": "", - "name": "", - "note": "", - "title": "", - "type": "" - } -} - -example { - name: 200 Response (fields/contacts/categories/{field_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/contacts/categories/{{field_id}} - method: PATCH - mode: json - body:json: { - { - "default_value": "", - "description": "Some New Text", - "label": "contact category field", - "name": "contact-category-field", - "note": "", - "title": "new contact category field", - "type": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories.bru b/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories.bru deleted file mode 100644 index ecee921..0000000 --- a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories.bru +++ /dev/null @@ -1,99 +0,0 @@ -meta { - name: fields/contacts/categories - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/fields/contacts/categories - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "context": "", - "default_value": "", - "description": "", - "group_id": 0, - "label": "", - "language": "", - "name": "", - "note": "", - "params": { - "class": "", - "display": "", - "display_readonly": "", - "hint": "", - "label_class": "", - "label_render_class": "", - "layout": "", - "prefix": "", - "render_class": "", - "show_on": "", - "showlabel": "", - "suffix": "" - }, - "required": 0, - "state": 0, - "title": "", - "type": "" - } -} - -example { - name: 200 Response (fields/contacts/categories) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/contacts/categories - method: POST - mode: json - body:json: { - { - "access": 1, - "context": "com_contact.categories", - "default_value": "", - "description": "", - "group_id": 0, - "label": "contact category field", - "language": "*", - "name": "contact-category-field", - "note": "", - "params": { - "class": "", - "display": "2", - "display_readonly": "2", - "hint": "", - "label_class": "", - "label_render_class": "", - "layout": "", - "prefix": "", - "render_class": "", - "show_on": "", - "showlabel": "1", - "suffix": "" - }, - "required": 0, - "state": 1, - "title": "contact category field", - "type": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Contacts Categories/Add Contacts Category.bru b/bruno/Joomla Web Services API/Contacts Categories/Add Contacts Category.bru deleted file mode 100644 index 67e2737..0000000 --- a/bruno/Joomla Web Services API/Contacts Categories/Add Contacts Category.bru +++ /dev/null @@ -1,67 +0,0 @@ -meta { - name: Add Contacts Category - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/contacts/categories - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "alias": "", - "extension": "", - "language": "", - "note": "", - "params": { - "workflow_id": 0 - }, - "parent_id": 0, - "published": 0, - "title": "" - } -} - -example { - name: 200 Response (contacts/categories) - description: todo: response object - - request: { - url: {{base_url}}/v1/contacts/categories - method: POST - mode: json - body:json: { - { - "access": 1, - "alias": "024a3408-dee0-45b9-965c-668aa89a0b9b", - "extension": "com_contacts", - "language": "*", - "note": "", - "params": { - "workflow_id": 1 - }, - "parent_id": 1, - "published": 1, - "title": "Direct Quality Representative" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Contacts Categories/Update Contacts Category}.bru b/bruno/Joomla Web Services API/Contacts Categories/Update Contacts Category}.bru deleted file mode 100644 index 04ed135..0000000 --- a/bruno/Joomla Web Services API/Contacts Categories/Update Contacts Category}.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: Update Contacts Category} - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/contacts/categories/{{category_id}} - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "note": "", - "parent_id": 0, - "title": "" - } -} - -example { - name: 200 Response (contacts/categories/{category_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/contacts/categories/{{category_id}} - method: PATCH - mode: json - body:json: { - { - "alias": "54031ae9-241c-4fc7-8a74-595547e4a1e3", - "note": "Esse voluptate consequatur et ad repellendus mollitia maiores.", - "parent_id": 1, - "title": "Incredible Cotton Car" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Contacts Form/contacts-form-{contact_id}.bru b/bruno/Joomla Web Services API/Contacts Form/contacts-form-{contact_id}.bru deleted file mode 100644 index d3aee4d..0000000 --- a/bruno/Joomla Web Services API/Contacts Form/contacts-form-{contact_id}.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: contacts/form/{contact_id} - type: http - seq: 1 -} - -post { - url: {{base_url}}/v1/contacts/form/{{contact_id}} - body: json - auth: inherit -} - -body:json { - { - "contact_email": "", - "contact_message": "", - "contact_name": "", - "contact_subject": "" - } -} - -example { - name: 200 Response (contacts/form/{contact_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/contacts/form/{{contact_id}} - method: POST - mode: json - body:json: { - { - "contact_email": "email@example.org", - "contact_message": "some text", - "contact_name": "name", - "contact_subject": "subject" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Contacts/Add contact.bru b/bruno/Joomla Web Services API/Contacts/Add contact.bru deleted file mode 100644 index 478ccbe..0000000 --- a/bruno/Joomla Web Services API/Contacts/Add contact.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: Add contact - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/contacts - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "catid": 0, - "language": "", - "name": "" - } -} - -example { - name: 200 Response (contacts) - description: todo: response object - - request: { - url: {{base_url}}/v1/contacts - method: POST - mode: json - body:json: { - { - "alias": "someones-name", - "catid": 4, - "language": "*", - "name": "Someones Name" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles (POST).bru b/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles (POST).bru deleted file mode 100644 index b7e1fff..0000000 --- a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles (POST).bru +++ /dev/null @@ -1,71 +0,0 @@ -meta { - name: fields/groups/content/articles (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/fields/groups/content/articles - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "checked_out": 0, - "context": "", - "created_by": 0, - "description": "", - "language": "", - "note": "", - "params": { - "display_readonly": "" - }, - "required": 0, - "state": 0, - "title": "" - } -} - -example { - name: 200 Response (fields/groups/content/articles) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/groups/content/articles - method: POST - mode: json - body:json: { - { - "access": 1, - "checked_out": 0, - "context": "com_content.article", - "created_by": 0, - "description": "", - "language": "*", - "note": "", - "params": { - "display_readonly": "1" - }, - "required": 0, - "state": 1, - "title": "article field group" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id} (PATCH).bru b/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id} (PATCH).bru deleted file mode 100644 index 981c312..0000000 --- a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id} (PATCH).bru +++ /dev/null @@ -1,51 +0,0 @@ -meta { - name: fields/groups/content/articles/{group_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/fields/groups/content/articles/{{group_id}} - body: json - auth: inherit -} - -body:json { - { - "description": "", - "note": "", - "title": "" - } -} - -example { - name: 200 Response (fields/groups/content/articles/{group_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/groups/content/articles/{{group_id}} - method: PATCH - mode: json - body:json: { - { - "description": "new description", - "note": "", - "title": "new article group" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id} (PATCH).bru b/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id} (PATCH).bru deleted file mode 100644 index abec594..0000000 --- a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: fields/content/articles/{field_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/fields/content/articles/{{field_id}} - body: json - auth: inherit -} - -body:json { - { - "default_value": "", - "description": "", - "label": "", - "name": "", - "note": "", - "title": "", - "type": "" - } -} - -example { - name: 200 Response (fields/content/articles/{field_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/content/articles/{{field_id}} - method: PATCH - mode: json - body:json: { - { - "default_value": "", - "description": "Some New Text", - "label": "article field", - "name": "article-field", - "note": "", - "title": "new article field", - "type": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Articles/content-articles (POST).bru b/bruno/Joomla Web Services API/Content Articles/content-articles (POST).bru deleted file mode 100644 index 1af6a76..0000000 --- a/bruno/Joomla Web Services API/Content Articles/content-articles (POST).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: content/articles (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/content/articles - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "articletext": "", - "catid": 0, - "language": "", - "metadesc": "", - "metakey": "", - "title": "" - } -} - -example { - name: 200 Response (content/articles) - description: todo: response object - - request: { - url: {{base_url}}/v1/content/articles - method: POST - mode: json - body:json: { - { - "alias": "my-article", - "articletext": "My text", - "catid": 64, - "language": "*", - "metadesc": "", - "metakey": "", - "title": "Here's an article" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories (POST).bru b/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories (POST).bru deleted file mode 100644 index c42be66..0000000 --- a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories (POST).bru +++ /dev/null @@ -1,107 +0,0 @@ -meta { - name: fields/content/categories (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/fields/content/categories - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "context": "", - "default_value": "", - "description": "", - "fieldparams": { - "filter": "", - "maxlength": 0 - }, - "group_id": 0, - "label": "", - "language": "", - "name": "", - "note": "", - "params": { - "class": "", - "display": "", - "display_readonly": "", - "hint": "", - "label_class": "", - "label_render_class": "", - "layout": "", - "prefix": "", - "render_class": "", - "show_on": "", - "showlabel": "", - "suffix": "" - }, - "required": 0, - "state": 0, - "title": "", - "type": "" - } -} - -example { - name: 200 Response (fields/content/categories) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/content/categories - method: POST - mode: json - body:json: { - { - "access": 1, - "context": "com_content.categories", - "default_value": "", - "description": "", - "fieldparams": { - "filter": "alnum", - "maxlength": 40 - }, - "group_id": 0, - "label": "content category field", - "language": "*", - "name": "content-category-field", - "note": "", - "params": { - "class": "", - "display": "2", - "display_readonly": "2", - "hint": "", - "label_class": "", - "label_render_class": "", - "layout": "", - "prefix": "", - "render_class": "", - "show_on": "", - "showlabel": "1", - "suffix": "" - }, - "required": 0, - "state": 1, - "title": "content category field", - "type": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id} (PATCH).bru b/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id} (PATCH).bru deleted file mode 100644 index deb6979..0000000 --- a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: fields/content/categories/{field_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/fields/content/categories/{{field_id}} - body: json - auth: inherit -} - -body:json { - { - "default_value": "", - "description": "", - "label": "", - "name": "", - "note": "", - "title": "", - "type": "" - } -} - -example { - name: 200 Response (fields/content/categories/{field_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/content/categories/{{field_id}} - method: PATCH - mode: json - body:json: { - { - "default_value": "", - "description": "Some New Text", - "label": "content category field", - "name": "content-category-field", - "note": "", - "title": "new content category field", - "type": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Categories/content-categories (POST).bru b/bruno/Joomla Web Services API/Content Categories/content-categories (POST).bru deleted file mode 100644 index a754b37..0000000 --- a/bruno/Joomla Web Services API/Content Categories/content-categories (POST).bru +++ /dev/null @@ -1,67 +0,0 @@ -meta { - name: content/categories (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/content/categories - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "alias": "", - "extension": "", - "language": "", - "note": "", - "params": { - "workflow_id": 0 - }, - "parent_id": 0, - "published": 0, - "title": "" - } -} - -example { - name: 200 Response (content/categories) - description: todo: response object - - request: { - url: {{base_url}}/v1/content/categories - method: POST - mode: json - body:json: { - { - "access": 1, - "alias": "8c3c6268-b662-44b6-b9ab-47aa67ef3701", - "extension": "com_content", - "language": "*", - "note": "", - "params": { - "workflow_id": 1 - }, - "parent_id": 1, - "published": 1, - "title": "Dynamic Brand Consultant" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id} (PATCH).bru b/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id} (PATCH).bru deleted file mode 100644 index 443b6bd..0000000 --- a/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id} (PATCH).bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: content/categories/{category_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/content/categories/{{category_id}} - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "note": "", - "parent_id": 0, - "title": "" - } -} - -example { - name: 200 Response (content/categories/{category_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/content/categories/{{category_id}} - method: PATCH - mode: json - body:json: { - { - "alias": "4c024085-71fe-4c56-8da9-e1694f8c8692", - "note": "Animi deserunt ratione dolor sit officia asperiores odit.", - "parent_id": 1, - "title": "Intelligent Cotton Fish" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps (POST).bru b/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps (POST).bru deleted file mode 100644 index 791b815..0000000 --- a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps (POST).bru +++ /dev/null @@ -1,75 +0,0 @@ -meta { - name: tours/{tour_id}/steps (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/tours/{{tour_id}}/steps - body: json - auth: inherit -} - -headers { - ~cookie: -} - -body:json { - { - "created": "", - "description": "", - "interactive_type": 0, - "language": "", - "modified": "", - "position": "", - "published": 0, - "target": "", - "title": "", - "type": 0, - "url": "" - } -} - -example { - name: 200 Response (tours/{tour_id}/steps) - description: todo: response object - - request: { - url: {{base_url}}/v1/tours/{{tour_id}}/steps - method: POST - mode: json - headers: { - ~cookie: - } - - body:json: { - { - "created": "2024-11-04 22:00:00", - "description": "asynchronous", - "interactive_type": 1, - "language": "*", - "modified": "2024-11-04 22:00:00", - "position": "top", - "published": 1, - "target": "#testElement", - "title": "Auer Inc", - "type": 2, - "url": "administrator/index.php?option=com_content&view=articles" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Guided Tours/tours (POST).bru b/bruno/Joomla Web Services API/Guided Tours/tours (POST).bru deleted file mode 100644 index 74ae496..0000000 --- a/bruno/Joomla Web Services API/Guided Tours/tours (POST).bru +++ /dev/null @@ -1,63 +0,0 @@ -meta { - name: tours (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/tours - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "autostart": 0, - "description": "", - "extensions": "", - "language": "", - "published": 0, - "title": "", - "uid": "", - "url": "" - } -} - -example { - name: 200 Response (tours) - description: todo: response object - - request: { - url: {{base_url}}/v1/tours - method: POST - mode: json - body:json: { - { - "access": 1, - "autostart": 0, - "description": "3rd generation", - "extensions": "['*']", - "language": "*", - "published": 1, - "title": "Handmade Frozen Shirt", - "uid": "9aa2d6cc-78b1-48e3-9cc8-463977696382", - "url": "administrator/index.php?option=com_content&view=articles" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Languages Content/languages-content (POST).bru b/bruno/Joomla Web Services API/Languages Content/languages-content (POST).bru deleted file mode 100644 index ed75e16..0000000 --- a/bruno/Joomla Web Services API/Languages Content/languages-content (POST).bru +++ /dev/null @@ -1,69 +0,0 @@ -meta { - name: languages/content (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/languages/content - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "description": "", - "image": "", - "lang_code": "", - "metadesc": "", - "metakey": "", - "ordering": 0, - "published": 0, - "sef": "", - "sitename": "", - "title": "", - "title_native": "" - } -} - -example { - name: 200 Response (languages/content) - description: todo: response object - - request: { - url: {{base_url}}/v1/languages/content - method: POST - mode: json - body:json: { - { - "access": 1, - "description": "", - "image": "fr_FR", - "lang_code": "fr-FR", - "metadesc": "", - "metakey": "", - "ordering": 1, - "published": 0, - "sef": "fk", - "sitename": "", - "title": "French (FR)", - "title_native": "Français (France)" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id} (PATCH).bru b/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id} (PATCH).bru deleted file mode 100644 index fe06d57..0000000 --- a/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: languages/content/{language_id} (PATCH) - type: http - seq: 4 -} - -patch { - url: {{base_url}}/v1/languages/content/{{language_id}} - body: json - auth: inherit -} - -body:json { - { - "description": "", - "lang_code": "", - "metadesc": "", - "metakey": "", - "sitename": "", - "title": "", - "title_native": "" - } -} - -example { - name: 200 Response (languages/content/{language_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/languages/content/{{language_id}} - method: PATCH - mode: json - body:json: { - { - "description": "", - "lang_code": "en-GB", - "metadesc": "", - "metakey": "", - "sitename": "", - "title": "English (en-GB)", - "title_native": "English (United Kingdom)" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Languages Overrides Search/languages-overrides-search.bru b/bruno/Joomla Web Services API/Languages Overrides Search/languages-overrides-search.bru deleted file mode 100644 index aa34226..0000000 --- a/bruno/Joomla Web Services API/Languages Overrides Search/languages-overrides-search.bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: languages/overrides/search - type: http - seq: 1 -} - -post { - url: {{base_url}}/v1/languages/overrides/search - body: json - auth: inherit -} - -body:json { - { - "searchstring": "", - "searchtype": "" - } -} - -example { - name: 200 Response (languages/overrides/search) - description: todo: response object - - request: { - url: {{base_url}}/v1/languages/overrides/search - method: POST - mode: json - body:json: { - { - "searchstring": "JLIB_APPLICATION_ERROR_SAVE_FAILED", - "searchtype": "constant" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code} (POST).bru b/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code} (POST).bru deleted file mode 100644 index db7479b..0000000 --- a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code} (POST).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: languages/overrides/{app}/{lang_code} (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/languages/overrides/{{app}}/{{lang_code}} - body: json - auth: inherit -} - -body:json { - { - "key": "", - "override": "" - } -} - -example { - name: 200 Response (languages/overrides/{app}/{lang_code}) - description: todo: response object - - request: { - url: {{base_url}}/v1/languages/overrides/{{app}}/{{lang_code}} - method: POST - mode: json - body:json: { - { - "key": "new_key", - "override": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Languages/languages (POST).bru b/bruno/Joomla Web Services API/Languages/languages (POST).bru deleted file mode 100644 index 25f2871..0000000 --- a/bruno/Joomla Web Services API/Languages/languages (POST).bru +++ /dev/null @@ -1,47 +0,0 @@ -meta { - name: languages (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/languages - body: json - auth: inherit -} - -body:json { - { - "package": "" - } -} - -example { - name: 200 Response (languages) - description: todo: response object - - request: { - url: {{base_url}}/v1/languages - method: POST - mode: json - body:json: { - { - "package": "pkg_fr-FR" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id} (PATCH).bru b/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id} (PATCH).bru deleted file mode 100644 index ac49934..0000000 --- a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: menus/{app}/items/{menu_item_id} (PATCH) - type: http - seq: 6 -} - -patch { - url: {{base_url}}/v1/menus/{{app}}/items/{{menu_item_id}} - body: json - auth: inherit -} - -body:json { - { - "component_id": "", - "language": "", - "link": "", - "menutype": "", - "note": "", - "title": "", - "type": "" - } -} - -example { - name: 200 Response (menus/{app}/items/{menu_item_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/menus/{{app}}/items/{{menu_item_id}} - method: PATCH - mode: json - body:json: { - { - "component_id": "20", - "language": "*", - "link": "index.php?option=com_content&view=form&layout=edit", - "menutype": "mainmenu", - "note": "", - "title": "new title", - "type": "component" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Menus/menus-{app} (POST).bru b/bruno/Joomla Web Services API/Menus/menus-{app} (POST).bru deleted file mode 100644 index 2b006a6..0000000 --- a/bruno/Joomla Web Services API/Menus/menus-{app} (POST).bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: menus/{app} (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/menus/{{app}} - body: json - auth: inherit -} - -body:json { - { - "client_id": 0, - "description": "", - "menutype": "", - "title": "" - } -} - -example { - name: 200 Response (menus/{app}) - description: todo: response object - - request: { - url: {{base_url}}/v1/menus/{{app}} - method: POST - mode: json - body:json: { - { - "client_id": 0, - "description": "The menu for the site", - "menutype": "menu", - "title": "Menu" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id} (PATCH).bru b/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id} (PATCH).bru deleted file mode 100644 index 7744210..0000000 --- a/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id} (PATCH).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: menus/{app}/{menu_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/menus/{{app}}/{{menu_id}} - body: json - auth: inherit -} - -body:json { - { - "menutype": "", - "title": "" - } -} - -example { - name: 200 Response (menus/{app}/{menu_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/menus/{{app}}/{{menu_id}} - method: PATCH - mode: json - body:json: { - { - "menutype": "menu", - "title": "New Menu" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Messages/messages (POST).bru b/bruno/Joomla Web Services API/Messages/messages (POST).bru deleted file mode 100644 index 244119d..0000000 --- a/bruno/Joomla Web Services API/Messages/messages (POST).bru +++ /dev/null @@ -1,55 +0,0 @@ -meta { - name: messages (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/messages - body: json - auth: inherit -} - -body:json { - { - "message": "", - "state": 0, - "subject": "", - "user_id_from": 0, - "user_id_to": 0 - } -} - -example { - name: 200 Response (messages) - description: todo: response object - - request: { - url: {{base_url}}/v1/messages - method: POST - mode: json - body:json: { - { - "message": "

text

", - "state": 0, - "subject": "text", - "user_id_from": 773, - "user_id_to": 772 - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Messages/messages-{message_id} (PATCH).bru b/bruno/Joomla Web Services API/Messages/messages-{message_id} (PATCH).bru deleted file mode 100644 index c6ede60..0000000 --- a/bruno/Joomla Web Services API/Messages/messages-{message_id} (PATCH).bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: messages/{message_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/messages/{{message_id}} - body: json - auth: inherit -} - -body:json { - { - "message": "", - "subject": "", - "user_id_from": 0, - "user_id_to": 0 - } -} - -example { - name: 200 Response (messages/{message_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/messages/{{message_id}} - method: PATCH - mode: json - body:json: { - { - "message": "

new text

", - "subject": "new text", - "user_id_from": 773, - "user_id_to": 772 - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Modules/modules-{app} (POST).bru b/bruno/Joomla Web Services API/Modules/modules-{app} (POST).bru deleted file mode 100644 index 2e7061c..0000000 --- a/bruno/Joomla Web Services API/Modules/modules-{app} (POST).bru +++ /dev/null @@ -1,102 +0,0 @@ -meta { - name: modules/{app} (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/modules/{{app}} - body: json - auth: inherit -} - -body:json { - { - "access": "", - "assigned": [], - "assignment": "", - "client_id": "", - "language": "", - "module": "", - "note": "", - "ordering": "", - "params": { - "bootstrap_size": "", - "cache": "", - "cache_time": "", - "cachemode": "", - "count": "", - "header_class": "", - "header_tag": "", - "layout": "", - "module_tag": "", - "moduleclass_sfx": "", - "style": "" - }, - "position": "", - "publish_down": "", - "publish_up": "", - "published": "", - "showtitle": "", - "title": "" - } -} - -example { - name: 200 Response (modules/{app}) - description: todo: response object - - request: { - url: {{base_url}}/v1/modules/{{app}} - method: POST - mode: json - body:json: { - { - "access": "1", - "assigned": [ - "101", - "105" - ], - "assignment": "0", - "client_id": "0", - "language": "*", - "module": "mod_articles_archive", - "note": "", - "ordering": "1", - "params": { - "bootstrap_size": "0", - "cache": "1", - "cache_time": "900", - "cachemode": "static", - "count": "10", - "header_class": "", - "header_tag": "h3", - "layout": "_:default", - "module_tag": "div", - "moduleclass_sfx": "", - "style": "0" - }, - "position": "", - "publish_down": "", - "publish_up": "", - "published": "1", - "showtitle": "1", - "title": "Title" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id} (PATCH).bru b/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id} (PATCH).bru deleted file mode 100644 index a06066c..0000000 --- a/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: modules/{app}/{module_id} (PATCH) - type: http - seq: 6 -} - -patch { - url: {{base_url}}/v1/modules/{{app}}/{{module_id}} - body: json - auth: inherit -} - -body:json { - { - "access": "", - "client_id": "", - "language": "", - "module": "", - "note": "", - "ordering": "", - "title": "" - } -} - -example { - name: 200 Response (modules/{app}/{module_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/modules/{{app}}/{{module_id}} - method: PATCH - mode: json - body:json: { - { - "access": "1", - "client_id": "0", - "language": "*", - "module": "mod_articles_archive", - "note": "", - "ordering": "1", - "title": "New Title" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id} (PATCH).bru b/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id} (PATCH).bru deleted file mode 100644 index 92e4767..0000000 --- a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id} (PATCH).bru +++ /dev/null @@ -1,61 +0,0 @@ -meta { - name: newsfeeds/feeds/{feed_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "alias": "", - "catid": 0, - "description": "", - "link": "", - "metadesc": "", - "metakey": "", - "name": "" - } -} - -example { - name: 200 Response (newsfeeds/feeds/{feed_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} - method: PATCH - mode: json - body:json: { - { - "access": 1, - "alias": "test2", - "catid": 5, - "description": "", - "link": "https://samoylov/joomla/gsoc19_webservices/index.php", - "metadesc": "", - "metakey": "", - "name": "Test" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Privacy Requests/privacy-requests (POST).bru b/bruno/Joomla Web Services API/Privacy Requests/privacy-requests (POST).bru deleted file mode 100644 index 90a0099..0000000 --- a/bruno/Joomla Web Services API/Privacy Requests/privacy-requests (POST).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: privacy/requests (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/privacy/requests - body: json - auth: inherit -} - -body:json { - { - "email": "", - "request_type": "" - } -} - -example { - name: 200 Response (privacy/requests) - description: todo: response object - - request: { - url: {{base_url}}/v1/privacy/requests - method: POST - mode: json - body:json: { - { - "email": "test@example.org", - "request_type": "export" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Redirects/redirect.bru b/bruno/Joomla Web Services API/Redirects/redirect.bru deleted file mode 100644 index 80fc679..0000000 --- a/bruno/Joomla Web Services API/Redirects/redirect.bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: redirect - type: http - seq: 1 -} - -post { - url: {{base_url}}/v1/redirect - body: json - auth: inherit -} - -body:json { - { - "comment": "", - "header": 0, - "hits": 0, - "new_url": "", - "old_url": "", - "published": 0, - "referer": "" - } -} - -example { - name: 200 Response (redirect) - description: todo: response object - - request: { - url: {{base_url}}/v1/redirect - method: POST - mode: json - body:json: { - { - "comment": "", - "header": 301, - "hits": 0, - "new_url": "/content/art/99", - "old_url": "/content/art/12", - "published": 1, - "referer": "" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Tags/tags (POST).bru b/bruno/Joomla Web Services API/Tags/tags (POST).bru deleted file mode 100644 index 0d16f1a..0000000 --- a/bruno/Joomla Web Services API/Tags/tags (POST).bru +++ /dev/null @@ -1,65 +0,0 @@ -meta { - name: tags (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/tags - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "access_title": "", - "alias": "", - "description": "", - "language": "", - "note": "", - "parent_id": 0, - "path": "", - "published": 0, - "title": "" - } -} - -example { - name: 200 Response (tags) - description: todo: response object - - request: { - url: {{base_url}}/v1/tags - method: POST - mode: json - body:json: { - { - "access": 1, - "access_title": "Public", - "alias": "test", - "description": "", - "language": "*", - "note": "", - "parent_id": 1, - "path": "test", - "published": 1, - "title": "test" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Tags/tags-{tag_id} (PATCH).bru b/bruno/Joomla Web Services API/Tags/tags-{tag_id} (PATCH).bru deleted file mode 100644 index 288e7b0..0000000 --- a/bruno/Joomla Web Services API/Tags/tags-{tag_id} (PATCH).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: tags/{tag_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/tags/{{tag_id}} - body: json - auth: inherit -} - -body:json { - { - "alias": "", - "title": "" - } -} - -example { - name: 200 Response (tags/{tag_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/tags/{{tag_id}} - method: PATCH - mode: json - body:json: { - { - "alias": "test", - "title": "new title" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app} (POST).bru b/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app} (POST).bru deleted file mode 100644 index a501893..0000000 --- a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app} (POST).bru +++ /dev/null @@ -1,63 +0,0 @@ -meta { - name: templates/styles/{app} (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/templates/styles/{{app}} - body: json - auth: inherit -} - -body:json { - { - "home": "", - "params": { - "fluidContainer": "", - "logoFile": "", - "sidebarLeftWidth": "", - "sidebarRightWidth": "" - }, - "template": "", - "title": "" - } -} - -example { - name: 200 Response (templates/styles/{app}) - description: todo: response object - - request: { - url: {{base_url}}/v1/templates/styles/{{app}} - method: POST - mode: json - body:json: { - { - "home": "0", - "params": { - "fluidContainer": "0", - "logoFile": "", - "sidebarLeftWidth": "3", - "sidebarRightWidth": "3" - }, - "template": "cassiopeia", - "title": "cassiopeia - Some Text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}-{template_style_id} (PATCH).bru b/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}-{template_style_id} (PATCH).bru deleted file mode 100644 index fa60d02..0000000 --- a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}-{template_style_id} (PATCH).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: templates/styles/{app}/{template_style_id} (PATCH) - type: http - seq: 4 -} - -patch { - url: {{base_url}}/v1/templates/styles/{{app}}/{{template_style_id}} - body: json - auth: inherit -} - -body:json { - { - "template": "", - "title": "" - } -} - -example { - name: 200 Response (templates/styles/{app}/{template_style_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/templates/styles/{{app}}/{{template_style_id}} - method: PATCH - mode: json - body:json: { - { - "template": "cassiopeia", - "title": "new cassiopeia - Default" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users (POST).bru b/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users (POST).bru deleted file mode 100644 index a1c7094..0000000 --- a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users (POST).bru +++ /dev/null @@ -1,71 +0,0 @@ -meta { - name: fields/groups/users (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/fields/groups/users - body: json - auth: inherit -} - -body:json { - { - "access": 0, - "checked_out": 0, - "context": "", - "created_by": 0, - "description": "", - "language": "", - "note": "", - "params": { - "display_readonly": "" - }, - "required": 0, - "state": 0, - "title": "" - } -} - -example { - name: 200 Response (fields/groups/users) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/groups/users - method: POST - mode: json - body:json: { - { - "access": 1, - "checked_out": 0, - "context": "com_users.user", - "created_by": 0, - "description": "", - "language": "*", - "note": "", - "params": { - "display_readonly": "1" - }, - "required": 0, - "state": 1, - "title": "user field group" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id} (PATCH).bru b/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id} (PATCH).bru deleted file mode 100644 index 68453dc..0000000 --- a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id} (PATCH).bru +++ /dev/null @@ -1,51 +0,0 @@ -meta { - name: fields/groups/users/{group_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/fields/groups/users/{{group_id}} - body: json - auth: inherit -} - -body:json { - { - "description": "", - "note": "", - "title": "" - } -} - -example { - name: 200 Response (fields/groups/users/{group_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/groups/users/{{group_id}} - method: PATCH - mode: json - body:json: { - { - "description": "new description", - "note": "", - "title": "new user group" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id} (PATCH).bru b/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id} (PATCH).bru deleted file mode 100644 index 1f5d7bb..0000000 --- a/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id} (PATCH).bru +++ /dev/null @@ -1,59 +0,0 @@ -meta { - name: fields/users/{field_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/fields/users/{{field_id}} - body: json - auth: inherit -} - -body:json { - { - "default_value": "", - "description": "", - "label": "", - "name": "", - "note": "", - "title": "", - "type": "" - } -} - -example { - name: 200 Response (fields/users/{field_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/fields/users/{{field_id}} - method: PATCH - mode: json - body:json: { - { - "default_value": "", - "description": "Some New Text", - "label": "user field", - "name": "user-field", - "note": "", - "title": "new user field", - "type": "text" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users Groups/users-groups (POST).bru b/bruno/Joomla Web Services API/Users Groups/users-groups (POST).bru deleted file mode 100644 index e31d0a9..0000000 --- a/bruno/Joomla Web Services API/Users Groups/users-groups (POST).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: users/groups (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/users/groups - body: json - auth: inherit -} - -body:json { - { - "parent_id": 0, - "title": "" - } -} - -example { - name: 200 Response (users/groups) - description: todo: response object - - request: { - url: {{base_url}}/v1/users/groups - method: POST - mode: json - body:json: { - { - "parent_id": 1, - "title": "Executive" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users Levels/users-levels (POST).bru b/bruno/Joomla Web Services API/Users Levels/users-levels (POST).bru deleted file mode 100644 index 53234d6..0000000 --- a/bruno/Joomla Web Services API/Users Levels/users-levels (POST).bru +++ /dev/null @@ -1,49 +0,0 @@ -meta { - name: users/levels (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/users/levels - body: json - auth: inherit -} - -body:json { - { - "rules": "", - "title": "" - } -} - -example { - name: 200 Response (users/levels) - description: todo: response object - - request: { - url: {{base_url}}/v1/users/levels - method: POST - mode: json - body:json: { - { - "rules": "[1]", - "title": "Specialist" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users/users (POST).bru b/bruno/Joomla Web Services API/Users/users (POST).bru deleted file mode 100644 index 4a055ca..0000000 --- a/bruno/Joomla Web Services API/Users/users (POST).bru +++ /dev/null @@ -1,91 +0,0 @@ -meta { - name: users (POST) - type: http - seq: 2 -} - -post { - url: {{base_url}}/v1/users - body: json - auth: inherit -} - -body:json { - { - "block": 0, - "email": "", - "groups": [], - "id": 0, - "lastResetTime": "", - "lastvisitDate": "", - "name": "", - "params": { - "admin_language": "", - "admin_style": "", - "editor": "", - "helpsite": "", - "language": "", - "timezone": "" - }, - "password": "", - "password2": "", - "registerDate": "", - "requireReset": false, - "resetCount": 0, - "sendEmail": false, - "username": "" - } -} - -example { - name: 200 Response (users) - description: todo: response object - - request: { - url: {{base_url}}/v1/users - method: POST - mode: json - body:json: { - { - "block": 0, - "email": "test@example.org", - "groups": [ - 2 - ], - "id": 0, - "lastResetTime": "", - "lastvisitDate": "", - "name": "nnn", - "params": { - "admin_language": "", - "admin_style": "", - "editor": "", - "helpsite": "", - "language": "", - "timezone": "" - }, - "password": "qwerty", - "password2": "qwerty", - "registerDate": "", - "requireReset": 0, - "resetCount": 0, - "sendEmail": 0, - "username": "ad" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/Joomla Web Services API/Users/users-{user_id} (PATCH).bru b/bruno/Joomla Web Services API/Users/users-{user_id} (PATCH).bru deleted file mode 100644 index 9b704be..0000000 --- a/bruno/Joomla Web Services API/Users/users-{user_id} (PATCH).bru +++ /dev/null @@ -1,55 +0,0 @@ -meta { - name: users/{user_id} (PATCH) - type: http - seq: 5 -} - -patch { - url: {{base_url}}/v1/users/{{user_id}} - body: json - auth: inherit -} - -body:json { - { - "email": "", - "groups": [], - "name": "", - "username": "" - } -} - -example { - name: 200 Response (users/{user_id}) - description: todo: response object - - request: { - url: {{base_url}}/v1/users/{{user_id}} - method: PATCH - mode: json - body:json: { - { - "email": "new@example.org", - "groups": [ - 2 - ], - "name": "name", - "username": "username" - } - } - } - - response: { - status: { - code: 200 - text: OK - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/bruno/joomla-web-services-api/banners-categories/add-category.bru b/bruno/joomla-web-services-api/banners-categories/add-category.bru new file mode 100644 index 0000000..eb65338 --- /dev/null +++ b/bruno/joomla-web-services-api/banners-categories/add-category.bru @@ -0,0 +1,99 @@ +meta { + name: Add Category + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/banners/categories + body: json + auth: inherit +} + +body:json { + { + "access": {{categorie_access}}, + "alias": "{{categorie_alias}}", + "extension": "{{categorie_extension}}", + "language": "{{categorie_language}}", + "note": "{{categorie_note}}", + "params": { + "workflow_id": 1 + }, + "parent_id": {{categorie_parent_id}}, + "published": {{categorie_published}}, + "title": "{{categorie_title}}" + } +} + +vars:pre-request { + categorie_access: 1 + categorie_alias: category-alias + categorie_extension: com_banners + categorie_language: * + categorie_note: + categorie_parent_id: 1 + categorie_published: 1 + categorie_title: A name for this Category +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("categorie_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("categorie_title")); + }); +} + +example { + name: 200 Response (banners/categories) + description: todo: response object + + request: { + url: {{base_url}}/v1/banners/categories + method: POST + mode: json + body:json: { + { + "access": 1, + "alias": "category-alias", + "extension": "com_banners", + "language": "*", + "note": "", + "params": { + "workflow_id": 1 + }, + "parent_id": 1, + "published": 1, + "title": "A name for this Category" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Banners Categories/Delete Category.bru b/bruno/joomla-web-services-api/banners-categories/delete-category.bru similarity index 82% rename from bruno/Joomla Web Services API/Banners Categories/Delete Category.bru rename to bruno/joomla-web-services-api/banners-categories/delete-category.bru index e766c24..d4ca1df 100644 --- a/bruno/Joomla Web Services API/Banners Categories/Delete Category.bru +++ b/bruno/joomla-web-services-api/banners-categories/delete-category.bru @@ -1,7 +1,7 @@ meta { name: Delete Category type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners Categories/folder.bru b/bruno/joomla-web-services-api/banners-categories/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Banners Categories/folder.bru rename to bruno/joomla-web-services-api/banners-categories/folder.bru diff --git a/bruno/Joomla Web Services API/Banners Categories/Get Banners Category.bru b/bruno/joomla-web-services-api/banners-categories/get-banners-category.bru similarity index 60% rename from bruno/Joomla Web Services API/Banners Categories/Get Banners Category.bru rename to bruno/joomla-web-services-api/banners-categories/get-banners-category.bru index a9b6f89..b875eb3 100644 --- a/bruno/Joomla Web Services API/Banners Categories/Get Banners Category.bru +++ b/bruno/joomla-web-services-api/banners-categories/get-banners-category.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners Categories/List Banners Categories.bru b/bruno/joomla-web-services-api/banners-categories/list-banners-categories.bru similarity index 70% rename from bruno/Joomla Web Services API/Banners Categories/List Banners Categories.bru rename to bruno/joomla-web-services-api/banners-categories/list-banners-categories.bru index 088b574..6a8b0e7 100644 --- a/bruno/Joomla Web Services API/Banners Categories/List Banners Categories.bru +++ b/bruno/joomla-web-services-api/banners-categories/list-banners-categories.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/banners-categories/update-banners-category.bru b/bruno/joomla-web-services-api/banners-categories/update-banners-category.bru new file mode 100644 index 0000000..d5c4495 --- /dev/null +++ b/bruno/joomla-web-services-api/banners-categories/update-banners-category.bru @@ -0,0 +1,74 @@ +meta { + name: Update Banners Category + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/banners/categories/{{category_id}} + body: json + auth: inherit +} + +body:json { + { + "alias": "{{category_updated_alias}}", + "note": "{{category_updated_note}}", + "parent_id": {{category_updated_parent_id}}, + "title": "{{category_updated_title}}" + } +} + +vars:pre-request { + category_updated_alias: updated-category + category_updated_note: Updated note for this category. + category_updated_parent_id: 1 + category_updated_title: Updated Category name +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("category_updated_title")); + }); +} + +example { + name: 200 Response (banners/categories/{category_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/banners/categories/{{category_id}} + method: PATCH + mode: json + body:json: { + { + "alias": "updated-category", + "note": "Updated note for this category.", + "parent_id": 1, + "title": "Updated Category name" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/joomla-web-services-api/banners-clients/add-banners-client.bru b/bruno/joomla-web-services-api/banners-clients/add-banners-client.bru new file mode 100644 index 0000000..6704720 --- /dev/null +++ b/bruno/joomla-web-services-api/banners-clients/add-banners-client.bru @@ -0,0 +1,87 @@ +meta { + name: Add Banners Client + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/banners/clients + body: json + auth: inherit +} + +body:json { + { + "contact": "{{client_contact}}", + "email": "{{client_email}}", + "extrainfo": "{{client_extrainfo}}", + "metakey": "{{client_metakey}}", + "name": "{{client_name}}", + "state": {{client_state}} + } +} + +vars:pre-request { + client_contact: Some ContactpersonName + client_email: somename@example.org + client_extrainfo: Some extra info about this Banners Client. + client_metakey: some keywords + client_name: Name of client + client_state: 1 +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("client_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name matches", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("client_name")); + }); +} + +example { + name: 200 Response (banners/clients) + description: todo: response object + + request: { + url: {{base_url}}/v1/banners/clients + method: POST + mode: json + body:json: { + { + "contact": "Some ContactpersonName", + "email": "somename@example.org", + "extrainfo": "Some extra info about this Banners Client.", + "metakey": "some keywords", + "name": "Name of client", + "state": 1 + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Banners Clients/Delete Banners Client.bru b/bruno/joomla-web-services-api/banners-clients/delete-banners-client.bru similarity index 82% rename from bruno/Joomla Web Services API/Banners Clients/Delete Banners Client.bru rename to bruno/joomla-web-services-api/banners-clients/delete-banners-client.bru index cf49e5b..dac3465 100644 --- a/bruno/Joomla Web Services API/Banners Clients/Delete Banners Client.bru +++ b/bruno/joomla-web-services-api/banners-clients/delete-banners-client.bru @@ -1,7 +1,7 @@ meta { name: Delete Banners Client type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners Clients/folder.bru b/bruno/joomla-web-services-api/banners-clients/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Banners Clients/folder.bru rename to bruno/joomla-web-services-api/banners-clients/folder.bru diff --git a/bruno/Joomla Web Services API/Banners Clients/Get Banners Client.bru b/bruno/joomla-web-services-api/banners-clients/get-banners-client.bru similarity index 59% rename from bruno/Joomla Web Services API/Banners Clients/Get Banners Client.bru rename to bruno/joomla-web-services-api/banners-clients/get-banners-client.bru index bf1cbda..a610fa8 100644 --- a/bruno/Joomla Web Services API/Banners Clients/Get Banners Client.bru +++ b/bruno/joomla-web-services-api/banners-clients/get-banners-client.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners Clients/List Banners Clients.bru b/bruno/joomla-web-services-api/banners-clients/list-banners-clients.bru similarity index 70% rename from bruno/Joomla Web Services API/Banners Clients/List Banners Clients.bru rename to bruno/joomla-web-services-api/banners-clients/list-banners-clients.bru index 0366c00..beb9b02 100644 --- a/bruno/Joomla Web Services API/Banners Clients/List Banners Clients.bru +++ b/bruno/joomla-web-services-api/banners-clients/list-banners-clients.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/banners-clients/update-banners-client.bru b/bruno/joomla-web-services-api/banners-clients/update-banners-client.bru new file mode 100644 index 0000000..54673f3 --- /dev/null +++ b/bruno/joomla-web-services-api/banners-clients/update-banners-client.bru @@ -0,0 +1,71 @@ +meta { + name: Update Banners Client + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/banners/clients/{{client_id}} + body: json + auth: inherit +} + +body:json { + { + "contact": "{{client_updated_contact}}", + "email": "{{client_updated_email}}", + "name": "{{client_updated_name}}" + } +} + +vars:pre-request { + client_updated_contact: {{client_updated_contact}} + client_updated_email: {{client_updated_email}} + client_updated_name: {{client_updated_name}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name updated", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("client_updated_name")); + }); +} + +example { + name: 200 Response (banners/clients/1) + description: todo: response object + + request: { + url: {{base_url}}/v1/banners/clients/{{client_id}} + method: PATCH + mode: json + body:json: { + { + "contact": "Updated ContactpersonName", + "email": "newemail@example.org", + "name": "Updated ClientName" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Banners Content History/Delete Banners Versions.bru b/bruno/joomla-web-services-api/banners-content-history/delete-banners-versions.bru similarity index 84% rename from bruno/Joomla Web Services API/Banners Content History/Delete Banners Versions.bru rename to bruno/joomla-web-services-api/banners-content-history/delete-banners-versions.bru index 6a61834..b9fe26f 100644 --- a/bruno/Joomla Web Services API/Banners Content History/Delete Banners Versions.bru +++ b/bruno/joomla-web-services-api/banners-content-history/delete-banners-versions.bru @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners Content History/folder.bru b/bruno/joomla-web-services-api/banners-content-history/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Banners Content History/folder.bru rename to bruno/joomla-web-services-api/banners-content-history/folder.bru diff --git a/bruno/Joomla Web Services API/Banners Content History/Keep Banners Version.bru b/bruno/joomla-web-services-api/banners-content-history/keep-banners-version.bru similarity index 68% rename from bruno/Joomla Web Services API/Banners Content History/Keep Banners Version.bru rename to bruno/joomla-web-services-api/banners-content-history/keep-banners-version.bru index b057bb1..f87812d 100644 --- a/bruno/Joomla Web Services API/Banners Content History/Keep Banners Version.bru +++ b/bruno/joomla-web-services-api/banners-content-history/keep-banners-version.bru @@ -14,6 +14,17 @@ params:path { version_id: } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response (banners/1/contenthistory/keep) description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners Content History/List Banners Versions.bru b/bruno/joomla-web-services-api/banners-content-history/list-banners-versions.bru similarity index 60% rename from bruno/Joomla Web Services API/Banners Content History/List Banners Versions.bru rename to bruno/joomla-web-services-api/banners-content-history/list-banners-versions.bru index 2152e0e..098cac5 100644 --- a/bruno/Joomla Web Services API/Banners Content History/List Banners Versions.bru +++ b/bruno/joomla-web-services-api/banners-content-history/list-banners-versions.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/banners/add-banner.bru b/bruno/joomla-web-services-api/banners/add-banner.bru new file mode 100644 index 0000000..e3fa01b --- /dev/null +++ b/bruno/joomla-web-services-api/banners/add-banner.bru @@ -0,0 +1,99 @@ +meta { + name: Add Banner + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/banners + body: json + auth: inherit +} + +body:json { + { + "catid": {{banner_catid}}, + "clicks": {{banner_clicks}}, + "custombannercode": "{{banner_custombannercode}}", + "description": "{{banner_description}}", + "metakey": "{{banner_metakey}}", + "name": "{{banner_name}}", + "params": { + "alt": "Managed user-facing alliance", + "height": 480, + "imageurl": "images/banners/banner.jpg", + "width": 640 + } + } +} + +vars:pre-request { + banner_catid: 3 + banner_clicks: 0 + banner_custombannercode: + banner_description: Some description of this Banner. + banner_metakey: some keywords + banner_name: Name for this Banner +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("banner_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name matches", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("banner_name")); + }); +} + +example { + name: 200 Response (banners) + description: todo: response object + + request: { + url: {{base_url}}/v1/banners + method: POST + mode: json + body:json: { + { + "catid": 3, + "clicks": 0, + "custombannercode": "", + "description": "Some description of this Banner.", + "metakey": "some keywords", + "name": "Name for this Banner", + "params": { + "alt": "Managed user-facing alliance", + "height": 480, + "imageurl": "images/banners/banner.jpg", + "width": 640 + } + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Banners/Delete Banner.bru b/bruno/joomla-web-services-api/banners/delete-banner.bru similarity index 81% rename from bruno/Joomla Web Services API/Banners/Delete Banner.bru rename to bruno/joomla-web-services-api/banners/delete-banner.bru index 33652eb..f5ca449 100644 --- a/bruno/Joomla Web Services API/Banners/Delete Banner.bru +++ b/bruno/joomla-web-services-api/banners/delete-banner.bru @@ -1,7 +1,7 @@ meta { name: Delete Banner type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Banners/folder.bru b/bruno/joomla-web-services-api/banners/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Banners/folder.bru rename to bruno/joomla-web-services-api/banners/folder.bru diff --git a/bruno/Joomla Web Services API/Banners/Get Banner.bru b/bruno/joomla-web-services-api/banners/get-banner.bru similarity index 58% rename from bruno/Joomla Web Services API/Banners/Get Banner.bru rename to bruno/joomla-web-services-api/banners/get-banner.bru index 8adfdef..d3be27e 100644 --- a/bruno/Joomla Web Services API/Banners/Get Banner.bru +++ b/bruno/joomla-web-services-api/banners/get-banner.bru @@ -10,8 +10,15 @@ get { auth: inherit } -vars:pre-request { - banner_id: 3 +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); } example { diff --git a/bruno/Joomla Web Services API/Banners/List Banners.bru b/bruno/joomla-web-services-api/banners/list-banners.bru similarity index 69% rename from bruno/Joomla Web Services API/Banners/List Banners.bru rename to bruno/joomla-web-services-api/banners/list-banners.bru index acbc384..764a698 100644 --- a/bruno/Joomla Web Services API/Banners/List Banners.bru +++ b/bruno/joomla-web-services-api/banners/list-banners.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/banners/update-banner.bru b/bruno/joomla-web-services-api/banners/update-banner.bru new file mode 100644 index 0000000..e0a420f --- /dev/null +++ b/bruno/joomla-web-services-api/banners/update-banner.bru @@ -0,0 +1,74 @@ +meta { + name: Update Banner + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/banners/{{banner_id}} + body: json + auth: inherit +} + +body:json { + { + "alias": "{{banner_updated_alias}}", + "catid": {{banner_updated_catid}}, + "description": "{{banner_updated_description}}", + "name": "{{banner_updated_name}}" + } +} + +vars:pre-request { + banner_updated_alias: updated-alias + banner_updated_catid: 3 + banner_updated_description: Updated description + banner_updated_name: Updated name of the Banner +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name updated", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("banner_updated_name")); + }); +} + +example { + name: 200 Response (banners/1) + description: todo: response object + + request: { + url: {{base_url}}/v1/banners/{{banner_id}} + method: PATCH + mode: json + body:json: { + { + "alias": "updated-alias", + "catid": 3, + "description": "Updated description", + "name": "Updated name of the Banner" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/bruno.json b/bruno/joomla-web-services-api/bruno.json similarity index 100% rename from bruno/Joomla Web Services API/bruno.json rename to bruno/joomla-web-services-api/bruno.json diff --git a/bruno/Joomla Web Services API/collection.bru b/bruno/joomla-web-services-api/collection.bru similarity index 100% rename from bruno/Joomla Web Services API/collection.bru rename to bruno/joomla-web-services-api/collection.bru diff --git a/bruno/Joomla Web Services API/Config Application/folder.bru b/bruno/joomla-web-services-api/config-application/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Config Application/folder.bru rename to bruno/joomla-web-services-api/config-application/folder.bru diff --git a/bruno/Joomla Web Services API/Config Application/Get Global Configuration.bru b/bruno/joomla-web-services-api/config-application/get-global-configuration.bru similarity index 70% rename from bruno/Joomla Web Services API/Config Application/Get Global Configuration.bru rename to bruno/joomla-web-services-api/config-application/get-global-configuration.bru index aec3c37..a5596af 100644 --- a/bruno/Joomla Web Services API/Config Application/Get Global Configuration.bru +++ b/bruno/joomla-web-services-api/config-application/get-global-configuration.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Config Application/Update Global Configuration.bru b/bruno/joomla-web-services-api/config-application/update-global-configuration.bru similarity index 53% rename from bruno/Joomla Web Services API/Config Application/Update Global Configuration.bru rename to bruno/joomla-web-services-api/config-application/update-global-configuration.bru index e87fed3..a72510a 100644 --- a/bruno/Joomla Web Services API/Config Application/Update Global Configuration.bru +++ b/bruno/joomla-web-services-api/config-application/update-global-configuration.bru @@ -12,11 +12,27 @@ patch { body:json { { - "debug": false, - "sitename": "" + "debug": {{application_updated_debug}}, + "sitename": "{{application_updated_sitename}}" } } +vars:pre-request { + application_updated_debug: true + application_updated_sitename: The Name of the Site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response (config/application) description: todo: response object diff --git a/bruno/Joomla Web Services API/Config Component/folder.bru b/bruno/joomla-web-services-api/config-component/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Config Component/folder.bru rename to bruno/joomla-web-services-api/config-component/folder.bru diff --git a/bruno/Joomla Web Services API/Config Component/Get Component Configuration.bru b/bruno/joomla-web-services-api/config-component/get-component-configuration.bru similarity index 69% rename from bruno/Joomla Web Services API/Config Component/Get Component Configuration.bru rename to bruno/joomla-web-services-api/config-component/get-component-configuration.bru index e83e28a..a575e53 100644 --- a/bruno/Joomla Web Services API/Config Component/Get Component Configuration.bru +++ b/bruno/joomla-web-services-api/config-component/get-component-configuration.bru @@ -11,7 +11,16 @@ get { } vars:pre-request { - component_name: com_contacts + component_name: component_name +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); } example { diff --git a/bruno/Joomla Web Services API/Config Component/Update Component Configuration.bru b/bruno/joomla-web-services-api/config-component/update-component-configuration.bru similarity index 55% rename from bruno/Joomla Web Services API/Config Component/Update Component Configuration.bru rename to bruno/joomla-web-services-api/config-component/update-component-configuration.bru index 7b4bfe7..2522024 100644 --- a/bruno/Joomla Web Services API/Config Component/Update Component Configuration.bru +++ b/bruno/joomla-web-services-api/config-component/update-component-configuration.bru @@ -11,7 +11,25 @@ patch { } body:json { - {} + { + "show_title": {{config_updated_show_title}} + } +} + +vars:pre-request { + component_name: component_name + config_updated_show_title: false +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); } example { diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact (POST).bru b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-post.bru similarity index 70% rename from bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact (POST).bru rename to bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-post.bru index 35c35fa..c8d4762 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact (POST).bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-post.bru @@ -12,19 +12,19 @@ post { body:json { { - "access": 0, - "context": "", - "default_value": "", - "description": "", - "group_id": 0, - "label": "", - "language": "", - "name": "", - "note": "", + "access": {{contact_access}}, + "context": "{{contact_context}}", + "default_value": "{{contact_default_value}}", + "description": "{{contact_description}}", + "group_id": {{contact_group_id}}, + "label": "{{contact_label}}", + "language": "{{contact_language}}", + "name": "{{contact_name}}", + "note": "{{contact_note}}", "params": { "class": "", - "display": "", - "display_readonly": "", + "display": "2", + "display_readonly": "2", "hint": "", "label_class": "", "label_render_class": "", @@ -32,16 +32,53 @@ body:json { "prefix": "", "render_class": "", "show_on": "", - "showlabel": "", + "showlabel": "1", "suffix": "" }, - "required": 0, - "state": 0, - "title": "", - "type": "" + "required": {{contact_required}}, + "state": {{contact_state}}, + "title": "{{contact_title}}", + "type": "{{contact_type}}" } } +vars:pre-request { + contact_access: 1 + contact_context: com_contact.contact + contact_default_value: + contact_description: + contact_group_id: 0 + contact_label: contact field + contact_language: * + contact_name: contact-field3 + contact_note: + contact_required: 0 + contact_state: 1 + contact_title: contact field + contact_type: text +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("contact_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("contact_title")); + }); +} + example { name: 200 Response (fields/groups/contacts/categories) description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id} (DELETE).bru b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id} (DELETE).bru rename to bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}-delete.bru index 691d11e..04f2a5a 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/groups/contacts/contact/{group_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id} (PATCH).bru b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}-patch.bru similarity index 69% rename from bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id} (PATCH).bru rename to bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}-patch.bru index bb3e777..9afc400 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: fields/groups/contacts/contact/{group_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,12 +12,32 @@ patch { body:json { { - "description": "", - "note": "", - "title": "" + "description": "{{group_updated_description}}", + "note": "{{group_updated_note}}", + "title": "{{group_updated_title}}" } } +vars:pre-request { + group_updated_description: {{group_updated_description}} + group_updated_note: {{group_updated_note}} + group_updated_title: {{group_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("group_updated_title")); + }); +} + example { name: 200 Response (fields/groups/contacts/categories/{group_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id}.bru b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}.bru similarity index 62% rename from bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id}.bru rename to bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}.bru index 13fbbea..17b7450 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact-{group_id}.bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact-{group_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact.bru b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact.bru similarity index 72% rename from bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact.bru rename to bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact.bru index 7156de1..5adca51 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/fields-groups-contacts-contact.bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields-groups/fields-groups-contacts-contact.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields Groups/folder.bru b/bruno/joomla-web-services-api/contacts-categories-fields-groups/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Contacts Categories Fields Groups/folder.bru rename to bruno/joomla-web-services-api/contacts-categories-fields-groups/folder.bru diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id} (DELETE).bru b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id} (DELETE).bru rename to bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}-delete.bru index aff09a3..f8eeb59 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/contacts/categories/{field_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}-patch.bru b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}-patch.bru new file mode 100644 index 0000000..3225c5c --- /dev/null +++ b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}-patch.bru @@ -0,0 +1,83 @@ +meta { + name: fields/contacts/categories/{field_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/fields/contacts/categories/{{field_id}} + body: json + auth: inherit +} + +body:json { + { + "default_value": "{{field_updated_default_value}}", + "description": "{{field_updated_description}}", + "label": "{{field_updated_label}}", + "name": "{{field_updated_name}}", + "note": "{{field_updated_note}}", + "title": "{{field_updated_title}}", + "type": "{{field_updated_type}}" + } +} + +vars:pre-request { + field_updated_default_value: {{field_updated_default_value}} + field_updated_description: {{field_updated_description}} + field_updated_label: {{field_updated_label}} + field_updated_name: {{field_updated_name}} + field_updated_note: {{field_updated_note}} + field_updated_title: {{field_updated_title}} + field_updated_type: {{field_updated_type}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("field_updated_title")); + }); +} + +example { + name: 200 Response (fields/contacts/categories/{field_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/contacts/categories/{{field_id}} + method: PATCH + mode: json + body:json: { + { + "default_value": "", + "description": "Some New Text", + "label": "contact category field", + "name": "contact-category-field", + "note": "", + "title": "new contact category field", + "type": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id}.bru b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}.bru similarity index 61% rename from bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id}.bru rename to bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}.bru index b211eef..4df08c6 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields/fields-contacts-categories-{field_id}.bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories-{field_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories.bru b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories.bru new file mode 100644 index 0000000..35c12ff --- /dev/null +++ b/bruno/joomla-web-services-api/contacts-categories-fields/fields-contacts-categories.bru @@ -0,0 +1,136 @@ +meta { + name: fields/contacts/categories + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/fields/contacts/categories + body: json + auth: inherit +} + +body:json { + { + "access": {{categorie_access}}, + "context": "{{categorie_context}}", + "default_value": "{{categorie_default_value}}", + "description": "{{categorie_description}}", + "group_id": {{categorie_group_id}}, + "label": "{{categorie_label}}", + "language": "{{categorie_language}}", + "name": "{{categorie_name}}", + "note": "{{categorie_note}}", + "params": { + "class": "", + "display": "2", + "display_readonly": "2", + "hint": "", + "label_class": "", + "label_render_class": "", + "layout": "", + "prefix": "", + "render_class": "", + "show_on": "", + "showlabel": "1", + "suffix": "" + }, + "required": {{categorie_required}}, + "state": {{categorie_state}}, + "title": "{{categorie_title}}", + "type": "{{categorie_type}}" + } +} + +vars:pre-request { + categorie_access: 1 + categorie_context: com_contact.categories + categorie_default_value: + categorie_description: + categorie_group_id: 0 + categorie_label: contact category field + categorie_language: * + categorie_name: contact-category-field + categorie_note: + categorie_required: 0 + categorie_state: 1 + categorie_title: contact category field + categorie_type: text +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("categorie_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("categorie_title")); + }); +} + +example { + name: 200 Response (fields/contacts/categories) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/contacts/categories + method: POST + mode: json + body:json: { + { + "access": 1, + "context": "com_contact.categories", + "default_value": "", + "description": "", + "group_id": 0, + "label": "contact category field", + "language": "*", + "name": "contact-category-field", + "note": "", + "params": { + "class": "", + "display": "2", + "display_readonly": "2", + "hint": "", + "label_class": "", + "label_render_class": "", + "layout": "", + "prefix": "", + "render_class": "", + "show_on": "", + "showlabel": "1", + "suffix": "" + }, + "required": 0, + "state": 1, + "title": "contact category field", + "type": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields/folder.bru b/bruno/joomla-web-services-api/contacts-categories-fields/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Contacts Categories Fields/folder.bru rename to bruno/joomla-web-services-api/contacts-categories-fields/folder.bru diff --git a/bruno/Joomla Web Services API/Contacts Categories Fields/List Contacts Categories Fields.bru b/bruno/joomla-web-services-api/contacts-categories-fields/list-contacts-categories-fields.bru similarity index 71% rename from bruno/Joomla Web Services API/Contacts Categories Fields/List Contacts Categories Fields.bru rename to bruno/joomla-web-services-api/contacts-categories-fields/list-contacts-categories-fields.bru index 2d68fec..0473fec 100644 --- a/bruno/Joomla Web Services API/Contacts Categories Fields/List Contacts Categories Fields.bru +++ b/bruno/joomla-web-services-api/contacts-categories-fields/list-contacts-categories-fields.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/contacts-categories/add-contacts-category.bru b/bruno/joomla-web-services-api/contacts-categories/add-contacts-category.bru new file mode 100644 index 0000000..b28b435 --- /dev/null +++ b/bruno/joomla-web-services-api/contacts-categories/add-contacts-category.bru @@ -0,0 +1,99 @@ +meta { + name: Add Contacts Category + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/contacts/categories + body: json + auth: inherit +} + +body:json { + { + "access": {{categorie_access}}, + "alias": "{{categorie_alias}}", + "extension": "{{categorie_extension}}", + "language": "{{categorie_language}}", + "note": "{{categorie_note}}", + "params": { + "workflow_id": 1 + }, + "parent_id": {{categorie_parent_id}}, + "published": {{categorie_published}}, + "title": "{{categorie_title}}" + } +} + +vars:pre-request { + categorie_access: 1 + categorie_alias: 024a3408-dee0-45b9-965c-668aa89a0b9b + categorie_extension: com_contacts + categorie_language: * + categorie_note: + categorie_parent_id: 1 + categorie_published: 1 + categorie_title: Direct Quality Representative +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("categorie_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("categorie_title")); + }); +} + +example { + name: 200 Response (contacts/categories) + description: todo: response object + + request: { + url: {{base_url}}/v1/contacts/categories + method: POST + mode: json + body:json: { + { + "access": 1, + "alias": "024a3408-dee0-45b9-965c-668aa89a0b9b", + "extension": "com_contacts", + "language": "*", + "note": "", + "params": { + "workflow_id": 1 + }, + "parent_id": 1, + "published": 1, + "title": "Direct Quality Representative" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Contacts Categories/Delete Contacts Category.bru b/bruno/joomla-web-services-api/contacts-categories/delete-contacts-category.bru similarity index 82% rename from bruno/Joomla Web Services API/Contacts Categories/Delete Contacts Category.bru rename to bruno/joomla-web-services-api/contacts-categories/delete-contacts-category.bru index bf75a83..bc11c9a 100644 --- a/bruno/Joomla Web Services API/Contacts Categories/Delete Contacts Category.bru +++ b/bruno/joomla-web-services-api/contacts-categories/delete-contacts-category.bru @@ -1,7 +1,7 @@ meta { name: Delete Contacts Category type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories/folder.bru b/bruno/joomla-web-services-api/contacts-categories/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Contacts Categories/folder.bru rename to bruno/joomla-web-services-api/contacts-categories/folder.bru diff --git a/bruno/Joomla Web Services API/Contacts Categories/Get Contacts Category.bru b/bruno/joomla-web-services-api/contacts-categories/get-contacts-category.bru similarity index 60% rename from bruno/Joomla Web Services API/Contacts Categories/Get Contacts Category.bru rename to bruno/joomla-web-services-api/contacts-categories/get-contacts-category.bru index 2ab5a01..3c6571c 100644 --- a/bruno/Joomla Web Services API/Contacts Categories/Get Contacts Category.bru +++ b/bruno/joomla-web-services-api/contacts-categories/get-contacts-category.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Categories/List Contacts Categories.bru b/bruno/joomla-web-services-api/contacts-categories/list-contacts-categories.bru similarity index 70% rename from bruno/Joomla Web Services API/Contacts Categories/List Contacts Categories.bru rename to bruno/joomla-web-services-api/contacts-categories/list-contacts-categories.bru index 4248f4b..ab76f36 100644 --- a/bruno/Joomla Web Services API/Contacts Categories/List Contacts Categories.bru +++ b/bruno/joomla-web-services-api/contacts-categories/list-contacts-categories.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/contacts-categories/update-contacts-category.bru b/bruno/joomla-web-services-api/contacts-categories/update-contacts-category.bru new file mode 100644 index 0000000..fa89883 --- /dev/null +++ b/bruno/joomla-web-services-api/contacts-categories/update-contacts-category.bru @@ -0,0 +1,74 @@ +meta { + name: Update Contacts Category} + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/contacts/categories/{{category_id}} + body: json + auth: inherit +} + +body:json { + { + "alias": "{{category_updated_alias}}", + "note": "{{category_updated_note}}", + "parent_id": {{category_updated_parent_id}}, + "title": "{{category_updated_title}}" + } +} + +vars:pre-request { + category_updated_alias: 54031ae9-241c-4fc7-8a74-595547e4a1e3 + category_updated_note: Esse voluptate consequatur et ad repellendus mollitia maiores. + category_updated_parent_id: 1 + category_updated_title: Incredible Cotton Car +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("category_updated_title")); + }); +} + +example { + name: 200 Response (contacts/categories/{category_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/contacts/categories/{{category_id}} + method: PATCH + mode: json + body:json: { + { + "alias": "54031ae9-241c-4fc7-8a74-595547e4a1e3", + "note": "Esse voluptate consequatur et ad repellendus mollitia maiores.", + "parent_id": 1, + "title": "Incredible Cotton Car" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact (POST).bru b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-post.bru similarity index 62% rename from bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact (POST).bru rename to bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-post.bru index 1452e4b..ecb9d08 100644 --- a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact (POST).bru +++ b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-post.bru @@ -12,19 +12,19 @@ post { body:json { { - "access": 0, - "context": "", - "default_value": "", - "description": "", - "group_id": 0, - "label": "", - "language": "", - "name": "", - "note": "", + "access": {{contact_access}}, + "context": "{{contact_context}}", + "default_value": "{{contact_default_value}}", + "description": "{{contact_description}}", + "group_id": {{contact_group_id}}, + "label": "{{contact_label}}", + "language": "{{contact_language}}", + "name": "{{contact_name}}", + "note": "{{contact_note}}", "params": { "class": "", - "display": "", - "display_readonly": "", + "display": "2", + "display_readonly": "2", "hint": "", "label_class": "", "label_render_class": "", @@ -32,16 +32,53 @@ body:json { "prefix": "", "render_class": "", "show_on": "", - "showlabel": "", + "showlabel": "1", "suffix": "" }, - "required": 0, - "state": 0, - "title": "", - "type": "" + "required": {{contact_required}}, + "state": {{contact_state}}, + "title": "{{contact_title}}", + "type": "{{contact_type}}" } } +vars:pre-request { + contact_access: 1 + contact_context: com_contact.contact + contact_default_value: + contact_description: + contact_group_id: 0 + contact_label: contact field + contact_language: * + contact_name: contact-field + contact_note: + contact_required: 0 + contact_state: 1 + contact_title: contact field + contact_type: text +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("contact_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("contact_title")); + }); +} + example { name: 200 Response (fields/contacts/contact) description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id} (DELETE).bru b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id} (DELETE).bru rename to bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}-delete.bru index 5bc9faa..0aa37a4 100644 --- a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/contacts/contact/{field_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id} (PATCH).bru b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}-patch.bru similarity index 55% rename from bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id} (PATCH).bru rename to bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}-patch.bru index 592a25b..e4bcc4f 100644 --- a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: fields/contacts/contact/{field_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,16 +12,40 @@ patch { body:json { { - "default_value": "", - "description": "", - "label": "", - "name": "", - "note": "", - "title": "", - "type": "" + "default_value": "{{field_updated_default_value}}", + "description": "{{field_updated_description}}", + "label": "{{field_updated_label}}", + "name": "{{field_updated_name}}", + "note": "{{field_updated_note}}", + "title": "{{field_updated_title}}", + "type": "{{field_updated_type}}" } } +vars:pre-request { + field_updated_default_value: {{field_updated_default_value}} + field_updated_description: {{field_updated_description}} + field_updated_label: {{field_updated_label}} + field_updated_name: {{field_updated_name}} + field_updated_note: {{field_updated_note}} + field_updated_title: {{field_updated_title}} + field_updated_type: {{field_updated_type}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("field_updated_title")); + }); +} + example { name: 200 Response (fields/contacts/contact/{field_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id}.bru b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}.bru similarity index 61% rename from bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id}.bru rename to bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}.bru index 289facc..58bc7ea 100644 --- a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact-{field_id}.bru +++ b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact-{field_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact.bru b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact.bru similarity index 71% rename from bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact.bru rename to bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact.bru index 97ef740..d608c8b 100644 --- a/bruno/Joomla Web Services API/Contacts Fields/fields-contacts-contact.bru +++ b/bruno/joomla-web-services-api/contacts-fields/fields-contacts-contact.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts Fields/folder.bru b/bruno/joomla-web-services-api/contacts-fields/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Contacts Fields/folder.bru rename to bruno/joomla-web-services-api/contacts-fields/folder.bru diff --git a/bruno/joomla-web-services-api/contacts-form/contacts-form-{contact_id}.bru b/bruno/joomla-web-services-api/contacts-form/contacts-form-{contact_id}.bru new file mode 100644 index 0000000..46722a0 --- /dev/null +++ b/bruno/joomla-web-services-api/contacts-form/contacts-form-{contact_id}.bru @@ -0,0 +1,78 @@ +meta { + name: contacts/form/{contact_id} + type: http + seq: 1 +} + +post { + url: {{base_url}}/v1/contacts/form/{{contact_id}} + body: json + auth: inherit +} + +body:json { + { + "contact_email": "{{form_contact_email}}", + "contact_message": "{{form_contact_message}}", + "contact_name": "{{form_contact_name}}", + "contact_subject": "{{form_contact_subject}}" + } +} + +vars:pre-request { + form_contact_email: {{form_contact_email}} + form_contact_message: {{form_contact_message}} + form_contact_name: {{form_contact_name}} + form_contact_subject: {{form_contact_subject}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("contact_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + +example { + name: 200 Response (contacts/form/{contact_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/contacts/form/{{contact_id}} + method: POST + mode: json + body:json: { + { + "contact_email": "email@example.org", + "contact_message": "some text", + "contact_name": "name", + "contact_subject": "subject" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Contacts Form/folder.bru b/bruno/joomla-web-services-api/contacts-form/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Contacts Form/folder.bru rename to bruno/joomla-web-services-api/contacts-form/folder.bru diff --git a/bruno/joomla-web-services-api/contacts/add-contact.bru b/bruno/joomla-web-services-api/contacts/add-contact.bru new file mode 100644 index 0000000..d0b251d --- /dev/null +++ b/bruno/joomla-web-services-api/contacts/add-contact.bru @@ -0,0 +1,81 @@ +meta { + name: Add contact + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/contacts + body: json + auth: inherit +} + +body:json { + { + "alias": "{{contact_alias}}", + "catid": {{contact_catid}}, + "language": "{{contact_language}}", + "name": "{{contact_name}}" + } +} + +vars:pre-request { + contact_alias: someones-name + contact_catid: 4 + contact_language: * + contact_name: Someones Name +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("contact_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name matches", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("contact_name")); + }); +} + +example { + name: 200 Response (contacts) + description: todo: response object + + request: { + url: {{base_url}}/v1/contacts + method: POST + mode: json + body:json: { + { + "alias": "someones-name", + "catid": 4, + "language": "*", + "name": "Someones Name" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Contacts/Delete Contact.bru b/bruno/joomla-web-services-api/contacts/delete-contact.bru similarity index 81% rename from bruno/Joomla Web Services API/Contacts/Delete Contact.bru rename to bruno/joomla-web-services-api/contacts/delete-contact.bru index ebd002e..1eb4c4e 100644 --- a/bruno/Joomla Web Services API/Contacts/Delete Contact.bru +++ b/bruno/joomla-web-services-api/contacts/delete-contact.bru @@ -1,7 +1,7 @@ meta { name: Delete Contact type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts/folder.bru b/bruno/joomla-web-services-api/contacts/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Contacts/folder.bru rename to bruno/joomla-web-services-api/contacts/folder.bru diff --git a/bruno/Joomla Web Services API/Contacts/Get Contact.bru b/bruno/joomla-web-services-api/contacts/get-contact.bru similarity index 58% rename from bruno/Joomla Web Services API/Contacts/Get Contact.bru rename to bruno/joomla-web-services-api/contacts/get-contact.bru index 13e0d8d..b4ab864 100644 --- a/bruno/Joomla Web Services API/Contacts/Get Contact.bru +++ b/bruno/joomla-web-services-api/contacts/get-contact.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts/List Contacts.bru b/bruno/joomla-web-services-api/contacts/list-contacts.bru similarity index 69% rename from bruno/Joomla Web Services API/Contacts/List Contacts.bru rename to bruno/joomla-web-services-api/contacts/list-contacts.bru index c04ff77..b8d423c 100644 --- a/bruno/Joomla Web Services API/Contacts/List Contacts.bru +++ b/bruno/joomla-web-services-api/contacts/list-contacts.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Contacts/Update Contact.bru b/bruno/joomla-web-services-api/contacts/update-contact.bru similarity index 84% rename from bruno/Joomla Web Services API/Contacts/Update Contact.bru rename to bruno/joomla-web-services-api/contacts/update-contact.bru index 9a2bf57..0704148 100644 --- a/bruno/Joomla Web Services API/Contacts/Update Contact.bru +++ b/bruno/joomla-web-services-api/contacts/update-contact.bru @@ -1,7 +1,7 @@ meta { name: Update Contact type: http - seq: 5 + seq: 4 } patch { @@ -10,6 +10,17 @@ patch { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response (contacts/{contact_id}) description: todo: response object diff --git a/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-post.bru b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-post.bru new file mode 100644 index 0000000..749c23a --- /dev/null +++ b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-post.bru @@ -0,0 +1,105 @@ +meta { + name: fields/groups/content/articles (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/fields/groups/content/articles + body: json + auth: inherit +} + +body:json { + { + "access": {{article_access}}, + "checked_out": {{article_checked_out}}, + "context": "{{article_context}}", + "created_by": {{article_created_by}}, + "description": "{{article_description}}", + "language": "{{article_language}}", + "note": "{{article_note}}", + "params": { + "display_readonly": "1" + }, + "required": {{article_required}}, + "state": {{article_state}}, + "title": "{{article_title}}" + } +} + +vars:pre-request { + article_access: 1 + article_checked_out: 0 + article_context: com_content.article + article_created_by: 0 + article_description: + article_language: * + article_note: + article_required: 0 + article_state: 1 + article_title: article field group +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("article_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("article_title")); + }); +} + +example { + name: 200 Response (fields/groups/content/articles) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/groups/content/articles + method: POST + mode: json + body:json: { + { + "access": 1, + "checked_out": 0, + "context": "com_content.article", + "created_by": 0, + "description": "", + "language": "*", + "note": "", + "params": { + "display_readonly": "1" + }, + "required": 0, + "state": 1, + "title": "article field group" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id} (DELETE).bru b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id} (DELETE).bru rename to bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}-delete.bru index efd68f2..43c1df1 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/groups/content/articles/{group_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}-patch.bru b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}-patch.bru new file mode 100644 index 0000000..a0a122a --- /dev/null +++ b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}-patch.bru @@ -0,0 +1,71 @@ +meta { + name: fields/groups/content/articles/{group_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/fields/groups/content/articles/{{group_id}} + body: json + auth: inherit +} + +body:json { + { + "description": "{{group_updated_description}}", + "note": "{{group_updated_note}}", + "title": "{{group_updated_title}}" + } +} + +vars:pre-request { + group_updated_description: {{group_updated_description}} + group_updated_note: {{group_updated_note}} + group_updated_title: {{group_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("group_updated_title")); + }); +} + +example { + name: 200 Response (fields/groups/content/articles/{group_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/groups/content/articles/{{group_id}} + method: PATCH + mode: json + body:json: { + { + "description": "new description", + "note": "", + "title": "new article group" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id}.bru b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}.bru similarity index 62% rename from bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id}.bru rename to bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}.bru index 2f663cc..0ef8f68 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles-{group_id}.bru +++ b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles-{group_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles.bru b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles.bru similarity index 72% rename from bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles.bru rename to bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles.bru index 45be1b3..abd4f38 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields Groups/fields-groups-content-articles.bru +++ b/bruno/joomla-web-services-api/content-articles-fields-groups/fields-groups-content-articles.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles Fields Groups/folder.bru b/bruno/joomla-web-services-api/content-articles-fields-groups/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Content Articles Fields Groups/folder.bru rename to bruno/joomla-web-services-api/content-articles-fields-groups/folder.bru diff --git a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles (POST).bru b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-post.bru similarity index 50% rename from bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles (POST).bru rename to bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-post.bru index 40925df..35b1a6a 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles (POST).bru +++ b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-post.bru @@ -12,23 +12,23 @@ post { body:json { { - "access": 0, - "context": "", - "default_value": "", - "description": "", + "access": {{article_access}}, + "context": "{{article_context}}", + "default_value": "{{article_default_value}}", + "description": "{{article_description}}", "fieldparams": { - "filter": "", - "maxlength": 0 + "filter": "alnum", + "maxlength": 40 }, - "group_id": 0, - "label": "", - "language": "", - "name": "", - "note": "", + "group_id": {{article_group_id}}, + "label": "{{article_label}}", + "language": "{{article_language}}", + "name": "{{article_name}}", + "note": "{{article_note}}", "params": { "class": "", - "display": "", - "display_readonly": "", + "display": "2", + "display_readonly": "2", "hint": "", "label_class": "", "label_render_class": "", @@ -36,16 +36,53 @@ body:json { "prefix": "", "render_class": "", "show_on": "", - "showlabel": "", + "showlabel": "1", "suffix": "" }, - "required": 0, - "state": 0, - "title": "", - "type": "" + "required": {{article_required}}, + "state": {{article_state}}, + "title": "{{article_title}}", + "type": "{{article_type}}" } } +vars:pre-request { + article_access: 1 + article_context: com_content.article + article_default_value: + article_description: + article_group_id: 0 + article_label: article field + article_language: * + article_name: article-field + article_note: + article_required: 0 + article_state: 1 + article_title: article field + article_type: text +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("article_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("article_title")); + }); +} + example { name: 200 Response (fields/content/articles) description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id} (DELETE).bru b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id} (DELETE).bru rename to bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}-delete.bru index d63f30b..9320210 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/content/articles/{field_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}-patch.bru b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}-patch.bru new file mode 100644 index 0000000..827edcb --- /dev/null +++ b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}-patch.bru @@ -0,0 +1,83 @@ +meta { + name: fields/content/articles/{field_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/fields/content/articles/{{field_id}} + body: json + auth: inherit +} + +body:json { + { + "default_value": "{{field_updated_default_value}}", + "description": "{{field_updated_description}}", + "label": "{{field_updated_label}}", + "name": "{{field_updated_name}}", + "note": "{{field_updated_note}}", + "title": "{{field_updated_title}}", + "type": "{{field_updated_type}}" + } +} + +vars:pre-request { + field_updated_default_value: {{field_updated_default_value}} + field_updated_description: {{field_updated_description}} + field_updated_label: {{field_updated_label}} + field_updated_name: {{field_updated_name}} + field_updated_note: {{field_updated_note}} + field_updated_title: {{field_updated_title}} + field_updated_type: {{field_updated_type}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("field_updated_title")); + }); +} + +example { + name: 200 Response (fields/content/articles/{field_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/content/articles/{{field_id}} + method: PATCH + mode: json + body:json: { + { + "default_value": "", + "description": "Some New Text", + "label": "article field", + "name": "article-field", + "note": "", + "title": "new article field", + "type": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id}.bru b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}.bru similarity index 61% rename from bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id}.bru rename to bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}.bru index f5825d8..592e569 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles-{field_id}.bru +++ b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles-{field_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles.bru b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles.bru similarity index 71% rename from bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles.bru rename to bruno/joomla-web-services-api/content-articles-fields/fields-content-articles.bru index c2c9370..39e6c93 100644 --- a/bruno/Joomla Web Services API/Content Articles Fields/fields-content-articles.bru +++ b/bruno/joomla-web-services-api/content-articles-fields/fields-content-articles.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles Fields/folder.bru b/bruno/joomla-web-services-api/content-articles-fields/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Content Articles Fields/folder.bru rename to bruno/joomla-web-services-api/content-articles-fields/folder.bru diff --git a/bruno/joomla-web-services-api/content-articles/content-articles-post.bru b/bruno/joomla-web-services-api/content-articles/content-articles-post.bru new file mode 100644 index 0000000..b48313c --- /dev/null +++ b/bruno/joomla-web-services-api/content-articles/content-articles-post.bru @@ -0,0 +1,90 @@ +meta { + name: content/articles (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/content/articles + body: json + auth: inherit +} + +body:json { + { + "alias": "{{article_alias}}", + "articletext": "{{article_articletext}}", + "catid": {{article_catid}}, + "language": "{{article_language}}", + "metadesc": "{{article_metadesc}}", + "metakey": "{{article_metakey}}", + "title": "{{article_title}}" + } +} + +vars:pre-request { + article_alias: my-article + article_articletext: My text + article_catid: 64 + article_language: * + article_metadesc: + article_metakey: + article_title: Here's an article +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("article_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("article_title")); + }); +} + +example { + name: 200 Response (content/articles) + description: todo: response object + + request: { + url: {{base_url}}/v1/content/articles + method: POST + mode: json + body:json: { + { + "alias": "my-article", + "articletext": "My text", + "catid": 64, + "language": "*", + "metadesc": "", + "metakey": "", + "title": "Here's an article" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Articles/content-articles-{article_id} (DELETE).bru b/bruno/joomla-web-services-api/content-articles/content-articles-{article_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Content Articles/content-articles-{article_id} (DELETE).bru rename to bruno/joomla-web-services-api/content-articles/content-articles-{article_id}-delete.bru index ccf5f0d..1f15269 100644 --- a/bruno/Joomla Web Services API/Content Articles/content-articles-{article_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/content-articles/content-articles-{article_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: content/articles/{article_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles/content-articles-{article_id} (PATCH).bru b/bruno/joomla-web-services-api/content-articles/content-articles-{article_id}-patch.bru similarity index 50% rename from bruno/Joomla Web Services API/Content Articles/content-articles-{article_id} (PATCH).bru rename to bruno/joomla-web-services-api/content-articles/content-articles-{article_id}-patch.bru index b4817a9..7a767e8 100644 --- a/bruno/Joomla Web Services API/Content Articles/content-articles-{article_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/content-articles/content-articles-{article_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: content/articles/{article_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,11 +12,30 @@ patch { body:json { { - "catid": 0, - "title": "" + "catid": {{article_updated_catid}}, + "title": "{{article_updated_title}}" } } +vars:pre-request { + article_updated_catid: 64 + article_updated_title: Updated article +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("article_updated_title")); + }); +} + example { name: 200 Response (content/articles/{article_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles/content-articles-{article_id}.bru b/bruno/joomla-web-services-api/content-articles/content-articles-{article_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Content Articles/content-articles-{article_id}.bru rename to bruno/joomla-web-services-api/content-articles/content-articles-{article_id}.bru index 098a011..e089c84 100644 --- a/bruno/Joomla Web Services API/Content Articles/content-articles-{article_id}.bru +++ b/bruno/joomla-web-services-api/content-articles/content-articles-{article_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles/content-articles.bru b/bruno/joomla-web-services-api/content-articles/content-articles.bru similarity index 82% rename from bruno/Joomla Web Services API/Content Articles/content-articles.bru rename to bruno/joomla-web-services-api/content-articles/content-articles.bru index 31e1a97..88f9b45 100644 --- a/bruno/Joomla Web Services API/Content Articles/content-articles.bru +++ b/bruno/joomla-web-services-api/content-articles/content-articles.bru @@ -22,6 +22,15 @@ params:query { ~list[direction]: } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Articles/folder.bru b/bruno/joomla-web-services-api/content-articles/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Content Articles/folder.bru rename to bruno/joomla-web-services-api/content-articles/folder.bru diff --git a/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-post.bru b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-post.bru new file mode 100644 index 0000000..079e862 --- /dev/null +++ b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-post.bru @@ -0,0 +1,144 @@ +meta { + name: fields/content/categories (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/fields/content/categories + body: json + auth: inherit +} + +body:json { + { + "access": {{categorie_access}}, + "context": "{{categorie_context}}", + "default_value": "{{categorie_default_value}}", + "description": "{{categorie_description}}", + "fieldparams": { + "filter": "alnum", + "maxlength": 40 + }, + "group_id": {{categorie_group_id}}, + "label": "{{categorie_label}}", + "language": "{{categorie_language}}", + "name": "{{categorie_name}}", + "note": "{{categorie_note}}", + "params": { + "class": "", + "display": "2", + "display_readonly": "2", + "hint": "", + "label_class": "", + "label_render_class": "", + "layout": "", + "prefix": "", + "render_class": "", + "show_on": "", + "showlabel": "1", + "suffix": "" + }, + "required": {{categorie_required}}, + "state": {{categorie_state}}, + "title": "{{categorie_title}}", + "type": "{{categorie_type}}" + } +} + +vars:pre-request { + categorie_access: 1 + categorie_context: com_content.categories + categorie_default_value: + categorie_description: + categorie_group_id: 0 + categorie_label: content category field + categorie_language: * + categorie_name: content-category-field + categorie_note: + categorie_required: 0 + categorie_state: 1 + categorie_title: content category field + categorie_type: text +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("categorie_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("categorie_title")); + }); +} + +example { + name: 200 Response (fields/content/categories) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/content/categories + method: POST + mode: json + body:json: { + { + "access": 1, + "context": "com_content.categories", + "default_value": "", + "description": "", + "fieldparams": { + "filter": "alnum", + "maxlength": 40 + }, + "group_id": 0, + "label": "content category field", + "language": "*", + "name": "content-category-field", + "note": "", + "params": { + "class": "", + "display": "2", + "display_readonly": "2", + "hint": "", + "label_class": "", + "label_render_class": "", + "layout": "", + "prefix": "", + "render_class": "", + "show_on": "", + "showlabel": "1", + "suffix": "" + }, + "required": 0, + "state": 1, + "title": "content category field", + "type": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id} (DELETE).bru b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id} (DELETE).bru rename to bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}-delete.bru index 8b3225e..2bb8f9a 100644 --- a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/content/categories/{field_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}-patch.bru b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}-patch.bru new file mode 100644 index 0000000..4197a53 --- /dev/null +++ b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}-patch.bru @@ -0,0 +1,83 @@ +meta { + name: fields/content/categories/{field_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/fields/content/categories/{{field_id}} + body: json + auth: inherit +} + +body:json { + { + "default_value": "{{field_updated_default_value}}", + "description": "{{field_updated_description}}", + "label": "{{field_updated_label}}", + "name": "{{field_updated_name}}", + "note": "{{field_updated_note}}", + "title": "{{field_updated_title}}", + "type": "{{field_updated_type}}" + } +} + +vars:pre-request { + field_updated_default_value: {{field_updated_default_value}} + field_updated_description: {{field_updated_description}} + field_updated_label: {{field_updated_label}} + field_updated_name: {{field_updated_name}} + field_updated_note: {{field_updated_note}} + field_updated_title: {{field_updated_title}} + field_updated_type: {{field_updated_type}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("field_updated_title")); + }); +} + +example { + name: 200 Response (fields/content/categories/{field_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/content/categories/{{field_id}} + method: PATCH + mode: json + body:json: { + { + "default_value": "", + "description": "Some New Text", + "label": "content category field", + "name": "content-category-field", + "note": "", + "title": "new content category field", + "type": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id}.bru b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}.bru similarity index 61% rename from bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id}.bru rename to bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}.bru index 59113de..2a8bf24 100644 --- a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories-{field_id}.bru +++ b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories-{field_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories.bru b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories.bru similarity index 71% rename from bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories.bru rename to bruno/joomla-web-services-api/content-categories-fields/fields-content-categories.bru index f8f4e91..388e655 100644 --- a/bruno/Joomla Web Services API/Content Categories Fields/fields-content-categories.bru +++ b/bruno/joomla-web-services-api/content-categories-fields/fields-content-categories.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Categories Fields/folder.bru b/bruno/joomla-web-services-api/content-categories-fields/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Content Categories Fields/folder.bru rename to bruno/joomla-web-services-api/content-categories-fields/folder.bru diff --git a/bruno/joomla-web-services-api/content-categories/content-categories-post.bru b/bruno/joomla-web-services-api/content-categories/content-categories-post.bru new file mode 100644 index 0000000..58497c6 --- /dev/null +++ b/bruno/joomla-web-services-api/content-categories/content-categories-post.bru @@ -0,0 +1,99 @@ +meta { + name: content/categories (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/content/categories + body: json + auth: inherit +} + +body:json { + { + "access": {{categorie_access}}, + "alias": "{{categorie_alias}}", + "extension": "{{categorie_extension}}", + "language": "{{categorie_language}}", + "note": "{{categorie_note}}", + "params": { + "workflow_id": 1 + }, + "parent_id": {{categorie_parent_id}}, + "published": {{categorie_published}}, + "title": "{{categorie_title}}" + } +} + +vars:pre-request { + categorie_access: 1 + categorie_alias: 8c3c6268-b662-44b6-b9ab-47aa67ef3701 + categorie_extension: com_content + categorie_language: * + categorie_note: + categorie_parent_id: 1 + categorie_published: 1 + categorie_title: Dynamic Brand Consultant +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("categorie_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("categorie_title")); + }); +} + +example { + name: 200 Response (content/categories) + description: todo: response object + + request: { + url: {{base_url}}/v1/content/categories + method: POST + mode: json + body:json: { + { + "access": 1, + "alias": "8c3c6268-b662-44b6-b9ab-47aa67ef3701", + "extension": "com_content", + "language": "*", + "note": "", + "params": { + "workflow_id": 1 + }, + "parent_id": 1, + "published": 1, + "title": "Dynamic Brand Consultant" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id} (DELETE).bru b/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Content Categories/content-categories-{category_id} (DELETE).bru rename to bruno/joomla-web-services-api/content-categories/content-categories-{category_id}-delete.bru index f809292..19ea6b6 100644 --- a/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: content/categories/{category_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}-patch.bru b/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}-patch.bru new file mode 100644 index 0000000..b77deb0 --- /dev/null +++ b/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}-patch.bru @@ -0,0 +1,74 @@ +meta { + name: content/categories/{category_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/content/categories/{{category_id}} + body: json + auth: inherit +} + +body:json { + { + "alias": "{{category_updated_alias}}", + "note": "{{category_updated_note}}", + "parent_id": {{category_updated_parent_id}}, + "title": "{{category_updated_title}}" + } +} + +vars:pre-request { + category_updated_alias: 4c024085-71fe-4c56-8da9-e1694f8c8692 + category_updated_note: Animi deserunt ratione dolor sit officia asperiores odit. + category_updated_parent_id: 1 + category_updated_title: Intelligent Cotton Fish +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("category_updated_title")); + }); +} + +example { + name: 200 Response (content/categories/{category_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/content/categories/{{category_id}} + method: PATCH + mode: json + body:json: { + { + "alias": "4c024085-71fe-4c56-8da9-e1694f8c8692", + "note": "Animi deserunt ratione dolor sit officia asperiores odit.", + "parent_id": 1, + "title": "Intelligent Cotton Fish" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id}.bru b/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Content Categories/content-categories-{category_id}.bru rename to bruno/joomla-web-services-api/content-categories/content-categories-{category_id}.bru index 4a11501..2f1acc2 100644 --- a/bruno/Joomla Web Services API/Content Categories/content-categories-{category_id}.bru +++ b/bruno/joomla-web-services-api/content-categories/content-categories-{category_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Categories/content-categories.bru b/bruno/joomla-web-services-api/content-categories/content-categories.bru similarity index 70% rename from bruno/Joomla Web Services API/Content Categories/content-categories.bru rename to bruno/joomla-web-services-api/content-categories/content-categories.bru index 5bb57cb..0780ea1 100644 --- a/bruno/Joomla Web Services API/Content Categories/content-categories.bru +++ b/bruno/joomla-web-services-api/content-categories/content-categories.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Content Categories/folder.bru b/bruno/joomla-web-services-api/content-categories/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Content Categories/folder.bru rename to bruno/joomla-web-services-api/content-categories/folder.bru diff --git a/bruno/Joomla Web Services API/environments/Joomla Web Services API.bru b/bruno/joomla-web-services-api/environments/joomla-web-services-api.bru similarity index 100% rename from bruno/Joomla Web Services API/environments/Joomla Web Services API.bru rename to bruno/joomla-web-services-api/environments/joomla-web-services-api.bru diff --git a/bruno/Joomla Web Services API/Guided Tours Steps/folder.bru b/bruno/joomla-web-services-api/guided-tours-steps/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Guided Tours Steps/folder.bru rename to bruno/joomla-web-services-api/guided-tours-steps/folder.bru diff --git a/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-post.bru b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-post.bru new file mode 100644 index 0000000..b975f38 --- /dev/null +++ b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-post.bru @@ -0,0 +1,110 @@ +meta { + name: tours/{tour_id}/steps (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/tours/{{tour_id}}/steps + body: json + auth: inherit +} + +headers { + ~cookie: +} + +body:json { + { + "created": "{{step_created}}", + "description": "{{step_description}}", + "interactive_type": {{step_interactive_type}}, + "language": "{{step_language}}", + "modified": "{{step_modified}}", + "position": "{{step_position}}", + "published": {{step_published}}, + "target": "{{step_target}}", + "title": "{{step_title}}", + "type": {{step_type}}, + "url": "{{step_url}}" + } +} + +vars:pre-request { + step_created: 2024-11-04 22:00:00 + step_description: asynchronous + step_interactive_type: 1 + step_language: * + step_modified: 2024-11-04 22:00:00 + step_position: top + step_published: 1 + step_target: #testElement + step_title: Auer Inc + step_type: 2 + step_url: administrator/index.php?option=com_content&view=articles +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("step_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("step_title")); + }); +} + +example { + name: 200 Response (tours/{tour_id}/steps) + description: todo: response object + + request: { + url: {{base_url}}/v1/tours/{{tour_id}}/steps + method: POST + mode: json + headers: { + ~cookie: + } + + body:json: { + { + "created": "2024-11-04 22:00:00", + "description": "asynchronous", + "interactive_type": 1, + "language": "*", + "modified": "2024-11-04 22:00:00", + "position": "top", + "published": 1, + "target": "#testElement", + "title": "Auer Inc", + "type": 2, + "url": "administrator/index.php?option=com_content&view=articles" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id} Copy.bru b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}-copy.bru similarity index 50% rename from bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id} Copy.bru rename to bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}-copy.bru index 9f472c6..f24d7c3 100644 --- a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id} Copy.bru +++ b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}-copy.bru @@ -1,7 +1,7 @@ meta { name: tours/{tour_id}/steps/{step_id} Copy type: http - seq: 5 + seq: 4 } patch { @@ -12,11 +12,30 @@ patch { body:json { { - "description": "", - "title": "" + "description": "{{step_updated_description}}", + "title": "{{step_updated_title}}" } } +vars:pre-request { + step_updated_description: {{step_updated_description}} + step_updated_title: {{step_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("step_updated_title")); + }); +} + example { name: 200 Response (tours/{tour_id}/steps/{step_id} Copy) description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id} (DELETE).bru b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id} (DELETE).bru rename to bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}-delete.bru index 87a9efa..97295f7 100644 --- a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: tours/{tour_id}/steps/{step_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id}.bru b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id}.bru rename to bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}.bru index 1d1ed12..ce89c67 100644 --- a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps-{step_id}.bru +++ b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps-{step_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps.bru b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps.bru similarity index 59% rename from bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps.bru rename to bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps.bru index 0077c30..81f959e 100644 --- a/bruno/Joomla Web Services API/Guided Tours Steps/tours-{tour_id}-steps.bru +++ b/bruno/joomla-web-services-api/guided-tours-steps/tours-{tour_id}-steps.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours/folder.bru b/bruno/joomla-web-services-api/guided-tours/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Guided Tours/folder.bru rename to bruno/joomla-web-services-api/guided-tours/folder.bru diff --git a/bruno/joomla-web-services-api/guided-tours/tours-post.bru b/bruno/joomla-web-services-api/guided-tours/tours-post.bru new file mode 100644 index 0000000..f9a79af --- /dev/null +++ b/bruno/joomla-web-services-api/guided-tours/tours-post.bru @@ -0,0 +1,96 @@ +meta { + name: tours (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/tours + body: json + auth: inherit +} + +body:json { + { + "access": {{tour_access}}, + "autostart": {{tour_autostart}}, + "description": "{{tour_description}}", + "extensions": "{{tour_extensions}}", + "language": "{{tour_language}}", + "published": {{tour_published}}, + "title": "{{tour_title}}", + "uid": "{{tour_uid}}", + "url": "{{tour_url}}" + } +} + +vars:pre-request { + tour_access: 1 + tour_autostart: 0 + tour_description: 3rd generation + tour_extensions: ['*'] + tour_language: * + tour_published: 1 + tour_title: Handmade Frozen Shirt + tour_uid: 9aa2d6cc-78b1-48e3-9cc8-463977696382 + tour_url: administrator/index.php?option=com_content&view=articles +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("tour_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("tour_title")); + }); +} + +example { + name: 200 Response (tours) + description: todo: response object + + request: { + url: {{base_url}}/v1/tours + method: POST + mode: json + body:json: { + { + "access": 1, + "autostart": 0, + "description": "3rd generation", + "extensions": "['*']", + "language": "*", + "published": 1, + "title": "Handmade Frozen Shirt", + "uid": "9aa2d6cc-78b1-48e3-9cc8-463977696382", + "url": "administrator/index.php?option=com_content&view=articles" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Guided Tours/tours-{tour_id} (DELETE).bru b/bruno/joomla-web-services-api/guided-tours/tours-{tour_id}-delete.bru similarity index 81% rename from bruno/Joomla Web Services API/Guided Tours/tours-{tour_id} (DELETE).bru rename to bruno/joomla-web-services-api/guided-tours/tours-{tour_id}-delete.bru index ec1bc03..301b77e 100644 --- a/bruno/Joomla Web Services API/Guided Tours/tours-{tour_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/guided-tours/tours-{tour_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: tours/{tour_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours/tours-{tour_id} (PATCH).bru b/bruno/joomla-web-services-api/guided-tours/tours-{tour_id}-patch.bru similarity index 50% rename from bruno/Joomla Web Services API/Guided Tours/tours-{tour_id} (PATCH).bru rename to bruno/joomla-web-services-api/guided-tours/tours-{tour_id}-patch.bru index 0fbe9ad..9947ad4 100644 --- a/bruno/Joomla Web Services API/Guided Tours/tours-{tour_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/guided-tours/tours-{tour_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: tours/{tour_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,10 +12,28 @@ patch { body:json { { - "title": "" + "title": "{{tour_updated_title}}" } } +vars:pre-request { + tour_updated_title: {{tour_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("tour_updated_title")); + }); +} + example { name: 200 Response (tours/{tour_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours/tours-{tour_id}.bru b/bruno/joomla-web-services-api/guided-tours/tours-{tour_id}.bru similarity index 58% rename from bruno/Joomla Web Services API/Guided Tours/tours-{tour_id}.bru rename to bruno/joomla-web-services-api/guided-tours/tours-{tour_id}.bru index 801fd4c..4e751b4 100644 --- a/bruno/Joomla Web Services API/Guided Tours/tours-{tour_id}.bru +++ b/bruno/joomla-web-services-api/guided-tours/tours-{tour_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Guided Tours/tours.bru b/bruno/joomla-web-services-api/guided-tours/tours.bru similarity index 68% rename from bruno/Joomla Web Services API/Guided Tours/tours.bru rename to bruno/joomla-web-services-api/guided-tours/tours.bru index 82a1d03..92865ab 100644 --- a/bruno/Joomla Web Services API/Guided Tours/tours.bru +++ b/bruno/joomla-web-services-api/guided-tours/tours.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Installer/extensions.bru b/bruno/joomla-web-services-api/installer/extensions.bru similarity index 69% rename from bruno/Joomla Web Services API/Installer/extensions.bru rename to bruno/joomla-web-services-api/installer/extensions.bru index 46cb176..0d714f4 100644 --- a/bruno/Joomla Web Services API/Installer/extensions.bru +++ b/bruno/joomla-web-services-api/installer/extensions.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Installer/folder.bru b/bruno/joomla-web-services-api/installer/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Installer/folder.bru rename to bruno/joomla-web-services-api/installer/folder.bru diff --git a/bruno/Joomla Web Services API/Languages Content/folder.bru b/bruno/joomla-web-services-api/languages-content/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Languages Content/folder.bru rename to bruno/joomla-web-services-api/languages-content/folder.bru diff --git a/bruno/joomla-web-services-api/languages-content/languages-content-post.bru b/bruno/joomla-web-services-api/languages-content/languages-content-post.bru new file mode 100644 index 0000000..e6707be --- /dev/null +++ b/bruno/joomla-web-services-api/languages-content/languages-content-post.bru @@ -0,0 +1,105 @@ +meta { + name: languages/content (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/languages/content + body: json + auth: inherit +} + +body:json { + { + "access": {{content_access}}, + "description": "{{content_description}}", + "image": "{{content_image}}", + "lang_code": "{{content_lang_code}}", + "metadesc": "{{content_metadesc}}", + "metakey": "{{content_metakey}}", + "ordering": {{content_ordering}}, + "published": {{content_published}}, + "sef": "{{content_sef}}", + "sitename": "{{content_sitename}}", + "title": "{{content_title}}", + "title_native": "{{content_title_native}}" + } +} + +vars:pre-request { + content_access: 1 + content_description: + content_image: fr_FR + content_lang_code: fr-FR + content_metadesc: + content_metakey: + content_ordering: 1 + content_published: 0 + content_sef: fk + content_sitename: + content_title: French (FR) + content_title_native: Français (France) +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("content_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("content_title")); + }); +} + +example { + name: 200 Response (languages/content) + description: todo: response object + + request: { + url: {{base_url}}/v1/languages/content + method: POST + mode: json + body:json: { + { + "access": 1, + "description": "", + "image": "fr_FR", + "lang_code": "fr-FR", + "metadesc": "", + "metakey": "", + "ordering": 1, + "published": 0, + "sef": "fk", + "sitename": "", + "title": "French (FR)", + "title_native": "Français (France)" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id} (GET).bru b/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}-get.bru similarity index 61% rename from bruno/Joomla Web Services API/Languages Content/languages-content-{language_id} (GET).bru rename to bruno/joomla-web-services-api/languages-content/languages-content-{language_id}-get.bru index 226bff6..e02b585 100644 --- a/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id} (GET).bru +++ b/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}-get.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}-patch.bru b/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}-patch.bru new file mode 100644 index 0000000..7e4d2a4 --- /dev/null +++ b/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}-patch.bru @@ -0,0 +1,83 @@ +meta { + name: languages/content/{language_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/languages/content/{{language_id}} + body: json + auth: inherit +} + +body:json { + { + "description": "{{language_updated_description}}", + "lang_code": "{{language_updated_lang_code}}", + "metadesc": "{{language_updated_metadesc}}", + "metakey": "{{language_updated_metakey}}", + "sitename": "{{language_updated_sitename}}", + "title": "{{language_updated_title}}", + "title_native": "{{language_updated_title_native}}" + } +} + +vars:pre-request { + language_updated_description: {{language_updated_description}} + language_updated_lang_code: {{language_updated_lang_code}} + language_updated_metadesc: {{language_updated_metadesc}} + language_updated_metakey: {{language_updated_metakey}} + language_updated_sitename: {{language_updated_sitename}} + language_updated_title: {{language_updated_title}} + language_updated_title_native: {{language_updated_title_native}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("language_updated_title")); + }); +} + +example { + name: 200 Response (languages/content/{language_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/languages/content/{{language_id}} + method: PATCH + mode: json + body:json: { + { + "description": "", + "lang_code": "en-GB", + "metadesc": "", + "metakey": "", + "sitename": "", + "title": "English (en-GB)", + "title_native": "English (United Kingdom)" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id}.bru b/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}.bru similarity index 84% rename from bruno/Joomla Web Services API/Languages Content/languages-content-{language_id}.bru rename to bruno/joomla-web-services-api/languages-content/languages-content-{language_id}.bru index cb539b2..786c7cb 100644 --- a/bruno/Joomla Web Services API/Languages Content/languages-content-{language_id}.bru +++ b/bruno/joomla-web-services-api/languages-content/languages-content-{language_id}.bru @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Languages Content/languages-content.bru b/bruno/joomla-web-services-api/languages-content/languages-content.bru similarity index 70% rename from bruno/Joomla Web Services API/Languages Content/languages-content.bru rename to bruno/joomla-web-services-api/languages-content/languages-content.bru index ea4f9ae..05b4c59 100644 --- a/bruno/Joomla Web Services API/Languages Content/languages-content.bru +++ b/bruno/joomla-web-services-api/languages-content/languages-content.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Languages Overrides Search/folder.bru b/bruno/joomla-web-services-api/languages-overrides-search/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Languages Overrides Search/folder.bru rename to bruno/joomla-web-services-api/languages-overrides-search/folder.bru diff --git a/bruno/Joomla Web Services API/Languages Overrides Search/languages-overrides-search-cache-refresh.bru b/bruno/joomla-web-services-api/languages-overrides-search/languages-overrides-search-cache-refresh.bru similarity index 50% rename from bruno/Joomla Web Services API/Languages Overrides Search/languages-overrides-search-cache-refresh.bru rename to bruno/joomla-web-services-api/languages-overrides-search/languages-overrides-search-cache-refresh.bru index a0cfba3..48e4bb4 100644 --- a/bruno/Joomla Web Services API/Languages Overrides Search/languages-overrides-search-cache-refresh.bru +++ b/bruno/joomla-web-services-api/languages-overrides-search/languages-overrides-search-cache-refresh.bru @@ -10,6 +10,24 @@ post { auth: inherit } +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("refresh_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/languages-overrides-search/languages-overrides-search.bru b/bruno/joomla-web-services-api/languages-overrides-search/languages-overrides-search.bru new file mode 100644 index 0000000..3f2757a --- /dev/null +++ b/bruno/joomla-web-services-api/languages-overrides-search/languages-overrides-search.bru @@ -0,0 +1,72 @@ +meta { + name: languages/overrides/search + type: http + seq: 1 +} + +post { + url: {{base_url}}/v1/languages/overrides/search + body: json + auth: inherit +} + +body:json { + { + "searchstring": "{{search_searchstring}}", + "searchtype": "{{search_searchtype}}" + } +} + +vars:pre-request { + search_searchstring: {{search_searchstring}} + search_searchtype: {{search_searchtype}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("search_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + +example { + name: 200 Response (languages/overrides/search) + description: todo: response object + + request: { + url: {{base_url}}/v1/languages/overrides/search + method: POST + mode: json + body:json: { + { + "searchstring": "JLIB_APPLICATION_ERROR_SAVE_FAILED", + "searchtype": "constant" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Languages Overrides/folder.bru b/bruno/joomla-web-services-api/languages-overrides/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Languages Overrides/folder.bru rename to bruno/joomla-web-services-api/languages-overrides/folder.bru diff --git a/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-post.bru b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-post.bru new file mode 100644 index 0000000..7a2d3b6 --- /dev/null +++ b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-post.bru @@ -0,0 +1,74 @@ +meta { + name: languages/overrides/{app}/{lang_code} (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/languages/overrides/{{app}}/{{lang_code}} + body: json + auth: inherit +} + +body:json { + { + "key": "{{override_key}}", + "override": "{{override_override}}" + } +} + +vars:pre-request { + app: site + lang_code: en-GB + override_key: {{override_key}} + override_override: {{override_override}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("override_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + +example { + name: 200 Response (languages/overrides/{app}/{lang_code}) + description: todo: response object + + request: { + url: {{base_url}}/v1/languages/overrides/{{app}}/{{lang_code}} + method: POST + mode: json + body:json: { + { + "key": "new_key", + "override": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id} (DELETE).bru b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}-delete.bru similarity index 78% rename from bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id} (DELETE).bru rename to bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}-delete.bru index be151a6..e98e9c4 100644 --- a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: languages/overrides/{app}/{lang_code}/{constant_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,17 @@ delete { auth: inherit } +vars:pre-request { + app: site + lang_code: en-GB +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id} (PATCH).bru b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}-patch.bru similarity index 56% rename from bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id} (PATCH).bru rename to bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}-patch.bru index 963b7a3..a4b3598 100644 --- a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: languages/overrides/{app}/{lang_code}/{constant_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,11 +12,29 @@ patch { body:json { { - "key": "", - "override": "" + "key": "{{constant_updated_key}}", + "override": "{{constant_updated_override}}" } } +vars:pre-request { + app: site + lang_code: en-GB + constant_updated_key: {{constant_updated_key}} + constant_updated_override: {{constant_updated_override}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response (languages/overrides/{app}/{lang_code}/{constant_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id}.bru b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id}.bru rename to bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}.bru index e653b7b..810c958 100644 --- a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}-{constant_id}.bru +++ b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}-{constant_id}.bru @@ -10,6 +10,22 @@ get { auth: inherit } +vars:pre-request { + app: site + lang_code: en-GB +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}.bru b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}.bru similarity index 68% rename from bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}.bru rename to bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}.bru index 0520684..ed705b2 100644 --- a/bruno/Joomla Web Services API/Languages Overrides/languages-overrides-{app}-{lang_code}.bru +++ b/bruno/joomla-web-services-api/languages-overrides/languages-overrides-{app}-{lang_code}.bru @@ -10,6 +10,20 @@ get { auth: inherit } +vars:pre-request { + app: site + lang_code: en-GB +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Languages/folder.bru b/bruno/joomla-web-services-api/languages/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Languages/folder.bru rename to bruno/joomla-web-services-api/languages/folder.bru diff --git a/bruno/joomla-web-services-api/languages/languages-post.bru b/bruno/joomla-web-services-api/languages/languages-post.bru new file mode 100644 index 0000000..980f688 --- /dev/null +++ b/bruno/joomla-web-services-api/languages/languages-post.bru @@ -0,0 +1,69 @@ +meta { + name: languages (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/languages + body: json + auth: inherit +} + +body:json { + { + "package": "{{language_package}}" + } +} + +vars:pre-request { + language_package: {{language_package}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("language_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + +example { + name: 200 Response (languages) + description: todo: response object + + request: { + url: {{base_url}}/v1/languages + method: POST + mode: json + body:json: { + { + "package": "pkg_fr-FR" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Languages/languages.bru b/bruno/joomla-web-services-api/languages/languages.bru similarity index 69% rename from bruno/Joomla Web Services API/Languages/languages.bru rename to bruno/joomla-web-services-api/languages/languages.bru index b8a4d2c..5727cbd 100644 --- a/bruno/Joomla Web Services API/Languages/languages.bru +++ b/bruno/joomla-web-services-api/languages/languages.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Media Adapters/folder.bru b/bruno/joomla-web-services-api/media-adapters/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Media Adapters/folder.bru rename to bruno/joomla-web-services-api/media-adapters/folder.bru diff --git a/bruno/Joomla Web Services API/Media Adapters/Get Media Adapter.bru b/bruno/joomla-web-services-api/media-adapters/get-media-adapter.bru similarity index 80% rename from bruno/Joomla Web Services API/Media Adapters/Get Media Adapter.bru rename to bruno/joomla-web-services-api/media-adapters/get-media-adapter.bru index 3694cfc..6acdffb 100644 --- a/bruno/Joomla Web Services API/Media Adapters/Get Media Adapter.bru +++ b/bruno/joomla-web-services-api/media-adapters/get-media-adapter.bru @@ -14,6 +14,17 @@ params:path { adapter_id: } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: Media adapter retrieved successfully. diff --git a/bruno/Joomla Web Services API/Media Adapters/List Media Adapters.bru b/bruno/joomla-web-services-api/media-adapters/list-media-adapters.bru similarity index 82% rename from bruno/Joomla Web Services API/Media Adapters/List Media Adapters.bru rename to bruno/joomla-web-services-api/media-adapters/list-media-adapters.bru index 20659b3..e292695 100644 --- a/bruno/Joomla Web Services API/Media Adapters/List Media Adapters.bru +++ b/bruno/joomla-web-services-api/media-adapters/list-media-adapters.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: Media adapters retrieved successfully. diff --git a/bruno/Joomla Web Services API/Media Files/Add Media File.bru b/bruno/joomla-web-services-api/media-files/add-media-file.bru similarity index 76% rename from bruno/Joomla Web Services API/Media Files/Add Media File.bru rename to bruno/joomla-web-services-api/media-files/add-media-file.bru index 28d106a..c20afd2 100644 --- a/bruno/Joomla Web Services API/Media Files/Add Media File.bru +++ b/bruno/joomla-web-services-api/media-files/add-media-file.bru @@ -12,11 +12,34 @@ post { body:json { { - "path": "", - "content": "" + "path": "{{file_path}}", + "content": "{{file_content}}" } } +vars:pre-request { + file_path: {{file_path}} + file_content: {{file_content}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("file_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: Succesful media file upload. diff --git a/bruno/Joomla Web Services API/Media Files/Delete Media File.bru b/bruno/joomla-web-services-api/media-files/delete-media-file.bru similarity index 84% rename from bruno/Joomla Web Services API/Media Files/Delete Media File.bru rename to bruno/joomla-web-services-api/media-files/delete-media-file.bru index 4adc99e..e2db781 100644 --- a/bruno/Joomla Web Services API/Media Files/Delete Media File.bru +++ b/bruno/joomla-web-services-api/media-files/delete-media-file.bru @@ -1,7 +1,7 @@ meta { name: Delete Media File type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,16 @@ delete { auth: inherit } +vars:pre-request { + file_path: file_path +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 204 Response description: Media file deleted successfully, but no content is returned diff --git a/bruno/Joomla Web Services API/Media Files/folder.bru b/bruno/joomla-web-services-api/media-files/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Media Files/folder.bru rename to bruno/joomla-web-services-api/media-files/folder.bru diff --git a/bruno/Joomla Web Services API/Media Files/Get Media File(s).bru b/bruno/joomla-web-services-api/media-files/get-media-files.bru similarity index 81% rename from bruno/Joomla Web Services API/Media Files/Get Media File(s).bru rename to bruno/joomla-web-services-api/media-files/get-media-files.bru index da2fa69..97d0d0f 100644 --- a/bruno/Joomla Web Services API/Media Files/Get Media File(s).bru +++ b/bruno/joomla-web-services-api/media-files/get-media-files.bru @@ -14,6 +14,19 @@ params:query { ~filter[search]: } +vars:pre-request { + file_path: file_path +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: Media file or directory listing returned successfully. diff --git a/bruno/Joomla Web Services API/Media Files/List Media Files.bru b/bruno/joomla-web-services-api/media-files/list-media-files.bru similarity index 88% rename from bruno/Joomla Web Services API/Media Files/List Media Files.bru rename to bruno/joomla-web-services-api/media-files/list-media-files.bru index ba3e75e..42bf737 100644 --- a/bruno/Joomla Web Services API/Media Files/List Media Files.bru +++ b/bruno/joomla-web-services-api/media-files/list-media-files.bru @@ -14,6 +14,15 @@ params:query { ~filter[search]: } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: Media files listed successfully. Todo: check when path is to single file diff --git a/bruno/Joomla Web Services API/Media Files/Update Media File.bru b/bruno/joomla-web-services-api/media-files/update-media-file.bru similarity index 75% rename from bruno/Joomla Web Services API/Media Files/Update Media File.bru rename to bruno/joomla-web-services-api/media-files/update-media-file.bru index 0292f3d..55a3598 100644 --- a/bruno/Joomla Web Services API/Media Files/Update Media File.bru +++ b/bruno/joomla-web-services-api/media-files/update-media-file.bru @@ -1,7 +1,7 @@ meta { name: Update Media File type: http - seq: 5 + seq: 4 } patch { @@ -12,11 +12,28 @@ patch { body:json { { - "path": "", - "content": "" + "path": "{{file_updated_path}}", + "content": "{{file_updated_content}}" } } +vars:pre-request { + file_path: file_path + file_updated_path: {{file_updated_path}} + file_updated_content: {{file_updated_content}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: Succesful media file update. diff --git a/bruno/Joomla Web Services API/Menus Items/folder.bru b/bruno/joomla-web-services-api/menus-items/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Menus Items/folder.bru rename to bruno/joomla-web-services-api/menus-items/folder.bru diff --git a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items (POST).bru b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-post.bru similarity index 50% rename from bruno/Joomla Web Services API/Menus Items/menus-{app}-items (POST).bru rename to bruno/joomla-web-services-api/menus-items/menus-{app}-items-post.bru index 1e03a34..3753244 100644 --- a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items (POST).bru +++ b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-post.bru @@ -12,32 +12,32 @@ post { body:json { { - "access": "", - "alias": "", + "access": "{{item_access}}", + "alias": "{{item_alias}}", "associations": { "en-GB": "", "fr-FR": "" }, - "browserNav": "", - "component_id": "", - "home": "", - "language": "", - "link": "", - "menutype": "", - "note": "", + "browserNav": "{{item_browserNav}}", + "component_id": "{{item_component_id}}", + "home": "{{item_home}}", + "language": "{{item_language}}", + "link": "{{item_link}}", + "menutype": "{{item_menutype}}", + "note": "{{item_note}}", "params": { "cancel_redirect_menuitem": "", "catid": "", - "custom_cancel_redirect": "", - "enable_category": "", + "custom_cancel_redirect": "0", + "enable_category": "0", "menu-anchor_css": "", "menu-anchor_title": "", "menu-meta_description": "", "menu-meta_keywords": "", "menu_image": "", "menu_image_css": "", - "menu_show": "", - "menu_text": "", + "menu_show": "1", + "menu_text": "1", "page_heading": "", "page_title": "", "pageclass_sfx": "", @@ -45,18 +45,61 @@ body:json { "robots": "", "show_page_heading": "" }, - "parent_id": "", - "publish_down": "", - "publish_up": "", - "published": "", - "template_style_id": "", - "title": "", - "toggle_modules_assigned": "", - "toggle_modules_published": "", - "type": "" + "parent_id": "{{item_parent_id}}", + "publish_down": "{{item_publish_down}}", + "publish_up": "{{item_publish_up}}", + "published": "{{item_published}}", + "template_style_id": "{{item_template_style_id}}", + "title": "{{item_title}}", + "toggle_modules_assigned": "{{item_toggle_modules_assigned}}", + "toggle_modules_published": "{{item_toggle_modules_published}}", + "type": "{{item_type}}" } } +vars:pre-request { + app: site + item_access: {{item_access}} + item_alias: {{item_alias}} + item_browserNav: {{item_browserNav}} + item_component_id: {{item_component_id}} + item_home: {{item_home}} + item_language: {{item_language}} + item_link: {{item_link}} + item_menutype: {{item_menutype}} + item_note: {{item_note}} + item_parent_id: {{item_parent_id}} + item_publish_down: {{item_publish_down}} + item_publish_up: {{item_publish_up}} + item_published: {{item_published}} + item_template_style_id: {{item_template_style_id}} + item_title: {{item_title}} + item_toggle_modules_assigned: {{item_toggle_modules_assigned}} + item_toggle_modules_published: {{item_toggle_modules_published}} + item_type: {{item_type}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("item_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("item_title")); + }); +} + example { name: 200 Response (menus/{app}/items) description: todo: response object diff --git a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-types.bru b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-types.bru similarity index 67% rename from bruno/Joomla Web Services API/Menus Items/menus-{app}-items-types.bru rename to bruno/joomla-web-services-api/menus-items/menus-{app}-items-types.bru index 854f002..b615cc6 100644 --- a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-types.bru +++ b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-types.bru @@ -10,6 +10,19 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id} (DELETE).bru b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}-delete.bru similarity index 80% rename from bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id} (DELETE).bru rename to bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}-delete.bru index af8da1e..51b783f 100644 --- a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}-delete.bru @@ -10,6 +10,16 @@ delete { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}-patch.bru b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}-patch.bru new file mode 100644 index 0000000..2829c89 --- /dev/null +++ b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}-patch.bru @@ -0,0 +1,84 @@ +meta { + name: menus/{app}/items/{menu_item_id} (PATCH) + type: http + seq: 6 +} + +patch { + url: {{base_url}}/v1/menus/{{app}}/items/{{menu_item_id}} + body: json + auth: inherit +} + +body:json { + { + "component_id": "{{menu_item_updated_component_id}}", + "language": "{{menu_item_updated_language}}", + "link": "{{menu_item_updated_link}}", + "menutype": "{{menu_item_updated_menutype}}", + "note": "{{menu_item_updated_note}}", + "title": "{{menu_item_updated_title}}", + "type": "{{menu_item_updated_type}}" + } +} + +vars:pre-request { + app: site + menu_item_updated_component_id: {{menu_item_updated_component_id}} + menu_item_updated_language: {{menu_item_updated_language}} + menu_item_updated_link: {{menu_item_updated_link}} + menu_item_updated_menutype: {{menu_item_updated_menutype}} + menu_item_updated_note: {{menu_item_updated_note}} + menu_item_updated_title: {{menu_item_updated_title}} + menu_item_updated_type: {{menu_item_updated_type}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("menu_item_updated_title")); + }); +} + +example { + name: 200 Response (menus/{app}/items/{menu_item_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/menus/{{app}}/items/{{menu_item_id}} + method: PATCH + mode: json + body:json: { + { + "component_id": "20", + "language": "*", + "link": "index.php?option=com_content&view=form&layout=edit", + "menutype": "mainmenu", + "note": "", + "title": "new title", + "type": "component" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id}.bru b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}.bru similarity index 58% rename from bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id}.bru rename to bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}.bru index fb77ac9..57f9f0f 100644 --- a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items-{menu_item_id}.bru +++ b/bruno/joomla-web-services-api/menus-items/menus-{app}-items-{menu_item_id}.bru @@ -10,6 +10,21 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items.bru b/bruno/joomla-web-services-api/menus-items/menus-{app}-items.bru similarity index 67% rename from bruno/Joomla Web Services API/Menus Items/menus-{app}-items.bru rename to bruno/joomla-web-services-api/menus-items/menus-{app}-items.bru index cc34854..b0e73c4 100644 --- a/bruno/Joomla Web Services API/Menus Items/menus-{app}-items.bru +++ b/bruno/joomla-web-services-api/menus-items/menus-{app}-items.bru @@ -10,6 +10,19 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Menus/folder.bru b/bruno/joomla-web-services-api/menus/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Menus/folder.bru rename to bruno/joomla-web-services-api/menus/folder.bru diff --git a/bruno/joomla-web-services-api/menus/menus-{app}-post.bru b/bruno/joomla-web-services-api/menus/menus-{app}-post.bru new file mode 100644 index 0000000..47c13b8 --- /dev/null +++ b/bruno/joomla-web-services-api/menus/menus-{app}-post.bru @@ -0,0 +1,82 @@ +meta { + name: menus/{app} (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/menus/{{app}} + body: json + auth: inherit +} + +body:json { + { + "client_id": {{menu_client_id}}, + "description": "{{menu_description}}", + "menutype": "{{menu_menutype}}", + "title": "{{menu_title}}" + } +} + +vars:pre-request { + app: site + menu_client_id: 0 + menu_description: The menu for the site + menu_menutype: menu + menu_title: Menu +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("menu_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("menu_title")); + }); +} + +example { + name: 200 Response (menus/{app}) + description: todo: response object + + request: { + url: {{base_url}}/v1/menus/{{app}} + method: POST + mode: json + body:json: { + { + "client_id": 0, + "description": "The menu for the site", + "menutype": "menu", + "title": "Menu" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id} (DELETE).bru b/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}-delete.bru similarity index 77% rename from bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id} (DELETE).bru rename to bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}-delete.bru index 010eb5a..005c15d 100644 --- a/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: menus/{app}/{menu_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,16 @@ delete { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}-patch.bru b/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}-patch.bru new file mode 100644 index 0000000..86ef617 --- /dev/null +++ b/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}-patch.bru @@ -0,0 +1,69 @@ +meta { + name: menus/{app}/{menu_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/menus/{{app}}/{{menu_id}} + body: json + auth: inherit +} + +body:json { + { + "menutype": "{{menu_updated_menutype}}", + "title": "{{menu_updated_title}}" + } +} + +vars:pre-request { + app: site + menu_updated_menutype: {{menu_updated_menutype}} + menu_updated_title: {{menu_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("menu_updated_title")); + }); +} + +example { + name: 200 Response (menus/{app}/{menu_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/menus/{{app}}/{{menu_id}} + method: PATCH + mode: json + body:json: { + { + "menutype": "menu", + "title": "New Menu" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id}.bru b/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}.bru similarity index 56% rename from bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id}.bru rename to bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}.bru index 5e09d8a..3e4dfba 100644 --- a/bruno/Joomla Web Services API/Menus/menus-{app}-{menu_id}.bru +++ b/bruno/joomla-web-services-api/menus/menus-{app}-{menu_id}.bru @@ -10,6 +10,21 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Menus/menus-{app}.bru b/bruno/joomla-web-services-api/menus/menus-{app}.bru similarity index 66% rename from bruno/Joomla Web Services API/Menus/menus-{app}.bru rename to bruno/joomla-web-services-api/menus/menus-{app}.bru index d3398e3..41b0a36 100644 --- a/bruno/Joomla Web Services API/Menus/menus-{app}.bru +++ b/bruno/joomla-web-services-api/menus/menus-{app}.bru @@ -10,6 +10,19 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Messages/folder.bru b/bruno/joomla-web-services-api/messages/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Messages/folder.bru rename to bruno/joomla-web-services-api/messages/folder.bru diff --git a/bruno/joomla-web-services-api/messages/messages-post.bru b/bruno/joomla-web-services-api/messages/messages-post.bru new file mode 100644 index 0000000..0ea0d62 --- /dev/null +++ b/bruno/joomla-web-services-api/messages/messages-post.bru @@ -0,0 +1,84 @@ +meta { + name: messages (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/messages + body: json + auth: inherit +} + +body:json { + { + "message": "{{message_message}}", + "state": {{message_state}}, + "subject": "{{message_subject}}", + "user_id_from": {{message_user_id_from}}, + "user_id_to": {{message_user_id_to}} + } +} + +vars:pre-request { + message_message:

text

+ message_state: 0 + message_subject: text + message_user_id_from: 773 + message_user_id_to: 772 +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("message_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("subject matches", function() { + expect(res.body.data.attributes.subject).to.equal(bru.getVar("message_subject")); + }); +} + +example { + name: 200 Response (messages) + description: todo: response object + + request: { + url: {{base_url}}/v1/messages + method: POST + mode: json + body:json: { + { + "message": "

text

", + "state": 0, + "subject": "text", + "user_id_from": 773, + "user_id_to": 772 + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Messages/messages-{message_id} (DELETE).bru b/bruno/joomla-web-services-api/messages/messages-{message_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Messages/messages-{message_id} (DELETE).bru rename to bruno/joomla-web-services-api/messages/messages-{message_id}-delete.bru index 87131ae..4fdc998 100644 --- a/bruno/Joomla Web Services API/Messages/messages-{message_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/messages/messages-{message_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: messages/{message_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/messages/messages-{message_id}-patch.bru b/bruno/joomla-web-services-api/messages/messages-{message_id}-patch.bru new file mode 100644 index 0000000..d2a3ee7 --- /dev/null +++ b/bruno/joomla-web-services-api/messages/messages-{message_id}-patch.bru @@ -0,0 +1,74 @@ +meta { + name: messages/{message_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/messages/{{message_id}} + body: json + auth: inherit +} + +body:json { + { + "message": "{{message_updated_message}}", + "subject": "{{message_updated_subject}}", + "user_id_from": {{message_updated_user_id_from}}, + "user_id_to": {{message_updated_user_id_to}} + } +} + +vars:pre-request { + message_updated_message:

new text

+ message_updated_subject: new text + message_updated_user_id_from: 773 + message_updated_user_id_to: 772 +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("subject updated", function() { + expect(res.body.data.attributes.subject).to.equal(bru.getVar("message_updated_subject")); + }); +} + +example { + name: 200 Response (messages/{message_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/messages/{{message_id}} + method: PATCH + mode: json + body:json: { + { + "message": "

new text

", + "subject": "new text", + "user_id_from": 773, + "user_id_to": 772 + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Messages/messages-{message_id}.bru b/bruno/joomla-web-services-api/messages/messages-{message_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Messages/messages-{message_id}.bru rename to bruno/joomla-web-services-api/messages/messages-{message_id}.bru index 930292e..3d4a2e9 100644 --- a/bruno/Joomla Web Services API/Messages/messages-{message_id}.bru +++ b/bruno/joomla-web-services-api/messages/messages-{message_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Messages/messages.bru b/bruno/joomla-web-services-api/messages/messages.bru similarity index 69% rename from bruno/Joomla Web Services API/Messages/messages.bru rename to bruno/joomla-web-services-api/messages/messages.bru index 2d636dd..66474f8 100644 --- a/bruno/Joomla Web Services API/Messages/messages.bru +++ b/bruno/joomla-web-services-api/messages/messages.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Modules/folder.bru b/bruno/joomla-web-services-api/modules/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Modules/folder.bru rename to bruno/joomla-web-services-api/modules/folder.bru diff --git a/bruno/Joomla Web Services API/Modules/modules-types-{app}.bru b/bruno/joomla-web-services-api/modules/modules-types-{app}.bru similarity index 67% rename from bruno/Joomla Web Services API/Modules/modules-types-{app}.bru rename to bruno/joomla-web-services-api/modules/modules-types-{app}.bru index d087d94..40efec7 100644 --- a/bruno/Joomla Web Services API/Modules/modules-types-{app}.bru +++ b/bruno/joomla-web-services-api/modules/modules-types-{app}.bru @@ -10,6 +10,19 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/modules/modules-{app}-post.bru b/bruno/joomla-web-services-api/modules/modules-{app}-post.bru new file mode 100644 index 0000000..2df41fc --- /dev/null +++ b/bruno/joomla-web-services-api/modules/modules-{app}-post.bru @@ -0,0 +1,143 @@ +meta { + name: modules/{app} (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/modules/{{app}} + body: json + auth: inherit +} + +body:json { + { + "access": "{{module_access}}", + "assigned": [ + "101", + "105" + ], + "assignment": "{{module_assignment}}", + "client_id": "{{module_client_id}}", + "language": "{{module_language}}", + "module": "{{module_module}}", + "note": "{{module_note}}", + "ordering": "{{module_ordering}}", + "params": { + "bootstrap_size": "0", + "cache": "1", + "cache_time": "900", + "cachemode": "static", + "count": "10", + "header_class": "", + "header_tag": "h3", + "layout": "_:default", + "module_tag": "div", + "moduleclass_sfx": "", + "style": "0" + }, + "position": "{{module_position}}", + "publish_down": "{{module_publish_down}}", + "publish_up": "{{module_publish_up}}", + "published": "{{module_published}}", + "showtitle": "{{module_showtitle}}", + "title": "{{module_title}}" + } +} + +vars:pre-request { + app: site + module_access: {{module_access}} + module_assignment: {{module_assignment}} + module_client_id: {{module_client_id}} + module_language: {{module_language}} + module_module: {{module_module}} + module_note: {{module_note}} + module_ordering: {{module_ordering}} + module_position: {{module_position}} + module_publish_down: {{module_publish_down}} + module_publish_up: {{module_publish_up}} + module_published: {{module_published}} + module_showtitle: {{module_showtitle}} + module_title: {{module_title}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("module_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("module_title")); + }); +} + +example { + name: 200 Response (modules/{app}) + description: todo: response object + + request: { + url: {{base_url}}/v1/modules/{{app}} + method: POST + mode: json + body:json: { + { + "access": "1", + "assigned": [ + "101", + "105" + ], + "assignment": "0", + "client_id": "0", + "language": "*", + "module": "mod_articles_archive", + "note": "", + "ordering": "1", + "params": { + "bootstrap_size": "0", + "cache": "1", + "cache_time": "900", + "cachemode": "static", + "count": "10", + "header_class": "", + "header_tag": "h3", + "layout": "_:default", + "module_tag": "div", + "moduleclass_sfx": "", + "style": "0" + }, + "position": "", + "publish_down": "", + "publish_up": "", + "published": "1", + "showtitle": "1", + "title": "Title" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id} (DELETE).bru b/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}-delete.bru similarity index 79% rename from bruno/Joomla Web Services API/Modules/modules-{app}-{module_id} (DELETE).bru rename to bruno/joomla-web-services-api/modules/modules-{app}-{module_id}-delete.bru index bfc2dc5..ff7523e 100644 --- a/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}-delete.bru @@ -10,6 +10,16 @@ delete { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}-patch.bru b/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}-patch.bru new file mode 100644 index 0000000..8457353 --- /dev/null +++ b/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}-patch.bru @@ -0,0 +1,84 @@ +meta { + name: modules/{app}/{module_id} (PATCH) + type: http + seq: 6 +} + +patch { + url: {{base_url}}/v1/modules/{{app}}/{{module_id}} + body: json + auth: inherit +} + +body:json { + { + "access": "{{module_updated_access}}", + "client_id": "{{module_updated_client_id}}", + "language": "{{module_updated_language}}", + "module": "{{module_updated_module}}", + "note": "{{module_updated_note}}", + "ordering": "{{module_updated_ordering}}", + "title": "{{module_updated_title}}" + } +} + +vars:pre-request { + app: site + module_updated_access: {{module_updated_access}} + module_updated_client_id: {{module_updated_client_id}} + module_updated_language: {{module_updated_language}} + module_updated_module: {{module_updated_module}} + module_updated_note: {{module_updated_note}} + module_updated_ordering: {{module_updated_ordering}} + module_updated_title: {{module_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("module_updated_title")); + }); +} + +example { + name: 200 Response (modules/{app}/{module_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/modules/{{app}}/{{module_id}} + method: PATCH + mode: json + body:json: { + { + "access": "1", + "client_id": "0", + "language": "*", + "module": "mod_articles_archive", + "note": "", + "ordering": "1", + "title": "New Title" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id}.bru b/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}.bru similarity index 57% rename from bruno/Joomla Web Services API/Modules/modules-{app}-{module_id}.bru rename to bruno/joomla-web-services-api/modules/modules-{app}-{module_id}.bru index f446983..30202de 100644 --- a/bruno/Joomla Web Services API/Modules/modules-{app}-{module_id}.bru +++ b/bruno/joomla-web-services-api/modules/modules-{app}-{module_id}.bru @@ -10,6 +10,21 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Modules/modules-{app}.bru b/bruno/joomla-web-services-api/modules/modules-{app}.bru similarity index 66% rename from bruno/Joomla Web Services API/Modules/modules-{app}.bru rename to bruno/joomla-web-services-api/modules/modules-{app}.bru index 67f7af8..20683fd 100644 --- a/bruno/Joomla Web Services API/Modules/modules-{app}.bru +++ b/bruno/joomla-web-services-api/modules/modules-{app}.bru @@ -10,6 +10,19 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Newsfeeds/folder.bru b/bruno/joomla-web-services-api/newsfeeds/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Newsfeeds/folder.bru rename to bruno/joomla-web-services-api/newsfeeds/folder.bru diff --git a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds (POST).bru b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-post.bru similarity index 62% rename from bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds (POST).bru rename to bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-post.bru index 008c0ff..231459f 100644 --- a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds (POST).bru +++ b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-post.bru @@ -12,10 +12,10 @@ post { body:json { { - "access": 0, - "alias": "", - "catid": 0, - "description": "", + "access": {{feed_access}}, + "alias": "{{feed_alias}}", + "catid": {{feed_catid}}, + "description": "{{feed_description}}", "images": { "float_first": "", "float_second": "", @@ -26,21 +26,21 @@ body:json { "image_second_alt": "", "image_second_caption": "" }, - "language": "", - "link": "", + "language": "{{feed_language}}", + "link": "{{feed_link}}", "metadata": { "hits": "", "rights": "", "robots": "", "tags": { "tags": "", - "typeAlias": "" + "typeAlias": null } }, - "metadesc": "", - "metakey": "", - "name": "", - "ordering": 0, + "metadesc": "{{feed_metadesc}}", + "metakey": "{{feed_metakey}}", + "name": "{{feed_name}}", + "ordering": {{feed_ordering}}, "params": { "feed_character_count": "", "feed_display_order": "", @@ -49,10 +49,45 @@ body:json { "show_feed_image": "", "show_item_description": "" }, - "published": 0 + "published": {{feed_published}} } } +vars:pre-request { + feed_access: 1 + feed_alias: alias + feed_catid: 5 + feed_description: + feed_language: * + feed_link: https://samoylov/joomla/gsoc19_webservices/index.php + feed_metadesc: + feed_metakey: + feed_name: Name + feed_ordering: 1 + feed_published: 1 +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("feed_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name matches", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("feed_name")); + }); +} + example { name: 200 Response (newsfeeds/feeds) description: todo: response object diff --git a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id} (DELETE).bru b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id} (DELETE).bru rename to bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}-delete.bru index 6ed074f..03d0535 100644 --- a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: newsfeeds/feeds/{feed_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}-patch.bru b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}-patch.bru new file mode 100644 index 0000000..b8ea646 --- /dev/null +++ b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}-patch.bru @@ -0,0 +1,86 @@ +meta { + name: newsfeeds/feeds/{feed_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} + body: json + auth: inherit +} + +body:json { + { + "access": {{feed_updated_access}}, + "alias": "{{feed_updated_alias}}", + "catid": {{feed_updated_catid}}, + "description": "{{feed_updated_description}}", + "link": "{{feed_updated_link}}", + "metadesc": "{{feed_updated_metadesc}}", + "metakey": "{{feed_updated_metakey}}", + "name": "{{feed_updated_name}}" + } +} + +vars:pre-request { + feed_updated_access: 1 + feed_updated_alias: test2 + feed_updated_catid: 5 + feed_updated_description: + feed_updated_link: https://samoylov/joomla/gsoc19_webservices/index.php + feed_updated_metadesc: + feed_updated_metakey: + feed_updated_name: Test +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name updated", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("feed_updated_name")); + }); +} + +example { + name: 200 Response (newsfeeds/feeds/{feed_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} + method: PATCH + mode: json + body:json: { + { + "access": 1, + "alias": "test2", + "catid": 5, + "description": "", + "link": "https://samoylov/joomla/gsoc19_webservices/index.php", + "metadesc": "", + "metakey": "", + "name": "Test" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id}.bru b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id}.bru rename to bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}.bru index fea6fde..51c2b42 100644 --- a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds-{feed_id}.bru +++ b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds-{feed_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds.bru b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds.bru similarity index 70% rename from bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds.bru rename to bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds.bru index 68d17a8..40784f1 100644 --- a/bruno/Joomla Web Services API/Newsfeeds/newsfeeds-feeds.bru +++ b/bruno/joomla-web-services-api/newsfeeds/newsfeeds-feeds.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Plugins/folder.bru b/bruno/joomla-web-services-api/plugins/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Plugins/folder.bru rename to bruno/joomla-web-services-api/plugins/folder.bru diff --git a/bruno/Joomla Web Services API/Plugins/plugins-{plugin_id} (PATCH).bru b/bruno/joomla-web-services-api/plugins/plugins-{plugin_id}-patch.bru similarity index 52% rename from bruno/Joomla Web Services API/Plugins/plugins-{plugin_id} (PATCH).bru rename to bruno/joomla-web-services-api/plugins/plugins-{plugin_id}-patch.bru index ee17d36..01e659d 100644 --- a/bruno/Joomla Web Services API/Plugins/plugins-{plugin_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/plugins/plugins-{plugin_id}-patch.bru @@ -12,12 +12,29 @@ patch { body:json { { - "access": 0, - "enabled": 0, - "ordering": 0 + "access": {{plugin_updated_access}}, + "enabled": {{plugin_updated_enabled}}, + "ordering": {{plugin_updated_ordering}} } } +vars:pre-request { + plugin_updated_access: 1 + plugin_updated_enabled: 1 + plugin_updated_ordering: -9999 +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response (plugins/{plugin_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Plugins/plugins-{plugin_id}.bru b/bruno/joomla-web-services-api/plugins/plugins-{plugin_id}.bru similarity index 58% rename from bruno/Joomla Web Services API/Plugins/plugins-{plugin_id}.bru rename to bruno/joomla-web-services-api/plugins/plugins-{plugin_id}.bru index b3962bf..f739701 100644 --- a/bruno/Joomla Web Services API/Plugins/plugins-{plugin_id}.bru +++ b/bruno/joomla-web-services-api/plugins/plugins-{plugin_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Plugins/plugins.bru b/bruno/joomla-web-services-api/plugins/plugins.bru similarity index 77% rename from bruno/Joomla Web Services API/Plugins/plugins.bru rename to bruno/joomla-web-services-api/plugins/plugins.bru index d7bd74a..09d2bce 100644 --- a/bruno/Joomla Web Services API/Plugins/plugins.bru +++ b/bruno/joomla-web-services-api/plugins/plugins.bru @@ -17,6 +17,15 @@ params:query { ~filter[type]: } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Privacy Consents/folder.bru b/bruno/joomla-web-services-api/privacy-consents/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Privacy Consents/folder.bru rename to bruno/joomla-web-services-api/privacy-consents/folder.bru diff --git a/bruno/Joomla Web Services API/Privacy Consents/privacy-consents-{consent_id} (DELETE).bru b/bruno/joomla-web-services-api/privacy-consents/privacy-consents-{consent_id}-delete.bru similarity index 84% rename from bruno/Joomla Web Services API/Privacy Consents/privacy-consents-{consent_id} (DELETE).bru rename to bruno/joomla-web-services-api/privacy-consents/privacy-consents-{consent_id}-delete.bru index 1d224cd..cc0c996 100644 --- a/bruno/Joomla Web Services API/Privacy Consents/privacy-consents-{consent_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/privacy-consents/privacy-consents-{consent_id}-delete.bru @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Privacy Consents/privacy-consents-{consent_id}.bru b/bruno/joomla-web-services-api/privacy-consents/privacy-consents-{consent_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Privacy Consents/privacy-consents-{consent_id}.bru rename to bruno/joomla-web-services-api/privacy-consents/privacy-consents-{consent_id}.bru index 399b640..55d9390 100644 --- a/bruno/Joomla Web Services API/Privacy Consents/privacy-consents-{consent_id}.bru +++ b/bruno/joomla-web-services-api/privacy-consents/privacy-consents-{consent_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Privacy Consents/privacy-consents.bru b/bruno/joomla-web-services-api/privacy-consents/privacy-consents.bru similarity index 70% rename from bruno/Joomla Web Services API/Privacy Consents/privacy-consents.bru rename to bruno/joomla-web-services-api/privacy-consents/privacy-consents.bru index fde5ca4..456108a 100644 --- a/bruno/Joomla Web Services API/Privacy Consents/privacy-consents.bru +++ b/bruno/joomla-web-services-api/privacy-consents/privacy-consents.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Privacy Requests/folder.bru b/bruno/joomla-web-services-api/privacy-requests/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Privacy Requests/folder.bru rename to bruno/joomla-web-services-api/privacy-requests/folder.bru diff --git a/bruno/joomla-web-services-api/privacy-requests/privacy-requests-post.bru b/bruno/joomla-web-services-api/privacy-requests/privacy-requests-post.bru new file mode 100644 index 0000000..e24c756 --- /dev/null +++ b/bruno/joomla-web-services-api/privacy-requests/privacy-requests-post.bru @@ -0,0 +1,72 @@ +meta { + name: privacy/requests (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/privacy/requests + body: json + auth: inherit +} + +body:json { + { + "email": "{{request_email}}", + "request_type": "{{request_request_type}}" + } +} + +vars:pre-request { + request_email: {{request_email}} + request_request_type: {{request_request_type}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("request_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + +example { + name: 200 Response (privacy/requests) + description: todo: response object + + request: { + url: {{base_url}}/v1/privacy/requests + method: POST + mode: json + body:json: { + { + "email": "test@example.org", + "request_type": "export" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Privacy Requests/privacy-requests-{request_id}.bru b/bruno/joomla-web-services-api/privacy-requests/privacy-requests-{request_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Privacy Requests/privacy-requests-{request_id}.bru rename to bruno/joomla-web-services-api/privacy-requests/privacy-requests-{request_id}.bru index 85422b4..a95378e 100644 --- a/bruno/Joomla Web Services API/Privacy Requests/privacy-requests-{request_id}.bru +++ b/bruno/joomla-web-services-api/privacy-requests/privacy-requests-{request_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Privacy Requests/privacy-requests.bru b/bruno/joomla-web-services-api/privacy-requests/privacy-requests.bru similarity index 70% rename from bruno/Joomla Web Services API/Privacy Requests/privacy-requests.bru rename to bruno/joomla-web-services-api/privacy-requests/privacy-requests.bru index 9bbb156..72f18b1 100644 --- a/bruno/Joomla Web Services API/Privacy Requests/privacy-requests.bru +++ b/bruno/joomla-web-services-api/privacy-requests/privacy-requests.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Privacy/folder.bru b/bruno/joomla-web-services-api/privacy/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Privacy/folder.bru rename to bruno/joomla-web-services-api/privacy/folder.bru diff --git a/bruno/Joomla Web Services API/Privacy/privacy-requests-export-{request_id}.bru b/bruno/joomla-web-services-api/privacy/privacy-requests-export-{request_id}.bru similarity index 61% rename from bruno/Joomla Web Services API/Privacy/privacy-requests-export-{request_id}.bru rename to bruno/joomla-web-services-api/privacy/privacy-requests-export-{request_id}.bru index c982d2f..8d77e98 100644 --- a/bruno/Joomla Web Services API/Privacy/privacy-requests-export-{request_id}.bru +++ b/bruno/joomla-web-services-api/privacy/privacy-requests-export-{request_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Redirects/folder.bru b/bruno/joomla-web-services-api/redirects/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Redirects/folder.bru rename to bruno/joomla-web-services-api/redirects/folder.bru diff --git a/bruno/joomla-web-services-api/redirects/redirect.bru b/bruno/joomla-web-services-api/redirects/redirect.bru new file mode 100644 index 0000000..08db718 --- /dev/null +++ b/bruno/joomla-web-services-api/redirects/redirect.bru @@ -0,0 +1,87 @@ +meta { + name: redirect + type: http + seq: 1 +} + +post { + url: {{base_url}}/v1/redirect + body: json + auth: inherit +} + +body:json { + { + "comment": "{{redirect_comment}}", + "header": {{redirect_header}}, + "hits": {{redirect_hits}}, + "new_url": "{{redirect_new_url}}", + "old_url": "{{redirect_old_url}}", + "published": {{redirect_published}}, + "referer": "{{redirect_referer}}" + } +} + +vars:pre-request { + redirect_comment: + redirect_header: 301 + redirect_hits: 0 + redirect_new_url: /content/art/99 + redirect_old_url: /content/art/12 + redirect_published: 1 + redirect_referer: +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("redirect_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); +} + +example { + name: 200 Response (redirect) + description: todo: response object + + request: { + url: {{base_url}}/v1/redirect + method: POST + mode: json + body:json: { + { + "comment": "", + "header": 301, + "hits": 0, + "new_url": "/content/art/99", + "old_url": "/content/art/12", + "published": 1, + "referer": "" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Redirects/redirects-{redirect_id} (DELETE).bru b/bruno/joomla-web-services-api/redirects/redirects-{redirect_id}-delete.bru similarity index 83% rename from bruno/Joomla Web Services API/Redirects/redirects-{redirect_id} (DELETE).bru rename to bruno/joomla-web-services-api/redirects/redirects-{redirect_id}-delete.bru index 4cfae53..596b6b8 100644 --- a/bruno/Joomla Web Services API/Redirects/redirects-{redirect_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/redirects/redirects-{redirect_id}-delete.bru @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Redirects/redirects-{redirect_id} (PATCH).bru b/bruno/joomla-web-services-api/redirects/redirects-{redirect_id}-patch.bru similarity index 53% rename from bruno/Joomla Web Services API/Redirects/redirects-{redirect_id} (PATCH).bru rename to bruno/joomla-web-services-api/redirects/redirects-{redirect_id}-patch.bru index 04e51f4..c94e5ce 100644 --- a/bruno/Joomla Web Services API/Redirects/redirects-{redirect_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/redirects/redirects-{redirect_id}-patch.bru @@ -12,11 +12,27 @@ patch { body:json { { - "new_url": "", - "old_url": "" + "new_url": "{{redirect_updated_new_url}}", + "old_url": "{{redirect_updated_old_url}}" } } +vars:pre-request { + redirect_updated_new_url: {{redirect_updated_new_url}} + redirect_updated_old_url: {{redirect_updated_old_url}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response (redirects/{redirect_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Redirects/redirects-{redirect_id}.bru b/bruno/joomla-web-services-api/redirects/redirects-{redirect_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Redirects/redirects-{redirect_id}.bru rename to bruno/joomla-web-services-api/redirects/redirects-{redirect_id}.bru index 85f8121..fa6fc3b 100644 --- a/bruno/Joomla Web Services API/Redirects/redirects-{redirect_id}.bru +++ b/bruno/joomla-web-services-api/redirects/redirects-{redirect_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Redirects/redirects.bru b/bruno/joomla-web-services-api/redirects/redirects.bru similarity index 69% rename from bruno/Joomla Web Services API/Redirects/redirects.bru rename to bruno/joomla-web-services-api/redirects/redirects.bru index 86dff68..f9e3068 100644 --- a/bruno/Joomla Web Services API/Redirects/redirects.bru +++ b/bruno/joomla-web-services-api/redirects/redirects.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Tags/folder.bru b/bruno/joomla-web-services-api/tags/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Tags/folder.bru rename to bruno/joomla-web-services-api/tags/folder.bru diff --git a/bruno/joomla-web-services-api/tags/tags-post.bru b/bruno/joomla-web-services-api/tags/tags-post.bru new file mode 100644 index 0000000..8d594fe --- /dev/null +++ b/bruno/joomla-web-services-api/tags/tags-post.bru @@ -0,0 +1,99 @@ +meta { + name: tags (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/tags + body: json + auth: inherit +} + +body:json { + { + "access": {{tags_access}}, + "access_title": "{{tags_access_title}}", + "alias": "{{tags_alias}}", + "description": "{{tags_description}}", + "language": "{{tags_language}}", + "note": "{{tags_note}}", + "parent_id": {{tags_parent_id}}, + "path": "{{tags_path}}", + "published": {{tags_published}}, + "title": "{{tags_title}}" + } +} + +vars:pre-request { + tags_access: 1 + tags_access_title: Public + tags_alias: test + tags_description: + tags_language: * + tags_note: + tags_parent_id: 1 + tags_path: test + tags_published: 1 + tags_title: test +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("tags_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("tags_title")); + }); +} + +example { + name: 200 Response (tags) + description: todo: response object + + request: { + url: {{base_url}}/v1/tags + method: POST + mode: json + body:json: { + { + "access": 1, + "access_title": "Public", + "alias": "test", + "description": "", + "language": "*", + "note": "", + "parent_id": 1, + "path": "test", + "published": 1, + "title": "test" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Tags/tags-{tag_id} (DELETE).bru b/bruno/joomla-web-services-api/tags/tags-{tag_id}-delete.bru similarity index 81% rename from bruno/Joomla Web Services API/Tags/tags-{tag_id} (DELETE).bru rename to bruno/joomla-web-services-api/tags/tags-{tag_id}-delete.bru index d0477d2..62c2c00 100644 --- a/bruno/Joomla Web Services API/Tags/tags-{tag_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/tags/tags-{tag_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: tags/{tag_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/tags/tags-{tag_id}-patch.bru b/bruno/joomla-web-services-api/tags/tags-{tag_id}-patch.bru new file mode 100644 index 0000000..883ed39 --- /dev/null +++ b/bruno/joomla-web-services-api/tags/tags-{tag_id}-patch.bru @@ -0,0 +1,68 @@ +meta { + name: tags/{tag_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/tags/{{tag_id}} + body: json + auth: inherit +} + +body:json { + { + "alias": "{{tag_updated_alias}}", + "title": "{{tag_updated_title}}" + } +} + +vars:pre-request { + tag_updated_alias: {{tag_updated_alias}} + tag_updated_title: {{tag_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("tag_updated_title")); + }); +} + +example { + name: 200 Response (tags/{tag_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/tags/{{tag_id}} + method: PATCH + mode: json + body:json: { + { + "alias": "test", + "title": "new title" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Tags/tags-{tag_id}.bru b/bruno/joomla-web-services-api/tags/tags-{tag_id}.bru similarity index 57% rename from bruno/Joomla Web Services API/Tags/tags-{tag_id}.bru rename to bruno/joomla-web-services-api/tags/tags-{tag_id}.bru index d788e3a..3d39c35 100644 --- a/bruno/Joomla Web Services API/Tags/tags-{tag_id}.bru +++ b/bruno/joomla-web-services-api/tags/tags-{tag_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Tags/tags.bru b/bruno/joomla-web-services-api/tags/tags.bru similarity index 68% rename from bruno/Joomla Web Services API/Tags/tags.bru rename to bruno/joomla-web-services-api/tags/tags.bru index beb6025..64c532d 100644 --- a/bruno/Joomla Web Services API/Tags/tags.bru +++ b/bruno/joomla-web-services-api/tags/tags.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Templates Styles/folder.bru b/bruno/joomla-web-services-api/templates-styles/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Templates Styles/folder.bru rename to bruno/joomla-web-services-api/templates-styles/folder.bru diff --git a/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-post.bru b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-post.bru new file mode 100644 index 0000000..e98e431 --- /dev/null +++ b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-post.bru @@ -0,0 +1,91 @@ +meta { + name: templates/styles/{app} (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/templates/styles/{{app}} + body: json + auth: inherit +} + +body:json { + { + "home": "{{style_home}}", + "params": { + "fluidContainer": "0", + "logoFile": "", + "sidebarLeftWidth": "3", + "sidebarRightWidth": "3" + }, + "template": "{{style_template}}", + "title": "{{style_title}}" + } +} + +vars:pre-request { + app: site + style_home: {{style_home}} + style_template: {{style_template}} + style_title: {{style_title}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("style_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("style_title")); + }); +} + +example { + name: 200 Response (templates/styles/{app}) + description: todo: response object + + request: { + url: {{base_url}}/v1/templates/styles/{{app}} + method: POST + mode: json + body:json: { + { + "home": "0", + "params": { + "fluidContainer": "0", + "logoFile": "", + "sidebarLeftWidth": "3", + "sidebarRightWidth": "3" + }, + "template": "cassiopeia", + "title": "cassiopeia - Some Text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-{template_style_id}-patch.bru b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-{template_style_id}-patch.bru new file mode 100644 index 0000000..027ddac --- /dev/null +++ b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-{template_style_id}-patch.bru @@ -0,0 +1,69 @@ +meta { + name: templates/styles/{app}/{template_style_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/templates/styles/{{app}}/{{template_style_id}} + body: json + auth: inherit +} + +body:json { + { + "template": "{{template_style_updated_template}}", + "title": "{{template_style_updated_title}}" + } +} + +vars:pre-request { + app: site + template_style_updated_template: {{template_style_updated_template}} + template_style_updated_title: {{template_style_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("template_style_updated_title")); + }); +} + +example { + name: 200 Response (templates/styles/{app}/{template_style_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/templates/styles/{{app}}/{{template_style_id}} + method: PATCH + mode: json + body:json: { + { + "template": "cassiopeia", + "title": "new cassiopeia - Default" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}-{template_style_id}.bru b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-{template_style_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}-{template_style_id}.bru rename to bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-{template_style_id}.bru index d0293bb..b4e4982 100644 --- a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}-{template_style_id}.bru +++ b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}-{template_style_id}.bru @@ -10,6 +10,21 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}.bru b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}.bru similarity index 67% rename from bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}.bru rename to bruno/joomla-web-services-api/templates-styles/templates-styles-{app}.bru index 8dc4ea7..70694a2 100644 --- a/bruno/Joomla Web Services API/Templates Styles/templates-styles-{app}.bru +++ b/bruno/joomla-web-services-api/templates-styles/templates-styles-{app}.bru @@ -10,6 +10,19 @@ get { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Templates/folder.bru b/bruno/joomla-web-services-api/templates/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Templates/folder.bru rename to bruno/joomla-web-services-api/templates/folder.bru diff --git a/bruno/Joomla Web Services API/Templates/templates-styles-{app}-{template_style_id} (DELETE).bru b/bruno/joomla-web-services-api/templates/templates-styles-{app}-{template_style_id}-delete.bru similarity index 81% rename from bruno/Joomla Web Services API/Templates/templates-styles-{app}-{template_style_id} (DELETE).bru rename to bruno/joomla-web-services-api/templates/templates-styles-{app}-{template_style_id}-delete.bru index cd7ab3c..a63174e 100644 --- a/bruno/Joomla Web Services API/Templates/templates-styles-{app}-{template_style_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/templates/templates-styles-{app}-{template_style_id}-delete.bru @@ -10,6 +10,16 @@ delete { auth: inherit } +vars:pre-request { + app: site +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-post.bru b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-post.bru new file mode 100644 index 0000000..e343c10 --- /dev/null +++ b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-post.bru @@ -0,0 +1,105 @@ +meta { + name: fields/groups/users (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/fields/groups/users + body: json + auth: inherit +} + +body:json { + { + "access": {{user_access}}, + "checked_out": {{user_checked_out}}, + "context": "{{user_context}}", + "created_by": {{user_created_by}}, + "description": "{{user_description}}", + "language": "{{user_language}}", + "note": "{{user_note}}", + "params": { + "display_readonly": "1" + }, + "required": {{user_required}}, + "state": {{user_state}}, + "title": "{{user_title}}" + } +} + +vars:pre-request { + user_access: 1 + user_checked_out: 0 + user_context: com_users.user + user_created_by: 0 + user_description: + user_language: * + user_note: + user_required: 0 + user_state: 1 + user_title: user field group +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("user_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("user_title")); + }); +} + +example { + name: 200 Response (fields/groups/users) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/groups/users + method: POST + mode: json + body:json: { + { + "access": 1, + "checked_out": 0, + "context": "com_users.user", + "created_by": 0, + "description": "", + "language": "*", + "note": "", + "params": { + "display_readonly": "1" + }, + "required": 0, + "state": 1, + "title": "user field group" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id} (DELETE).bru b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id} (DELETE).bru rename to bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}-delete.bru index de8977b..81907e7 100644 --- a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/groups/users/{group_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}-patch.bru b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}-patch.bru new file mode 100644 index 0000000..e50f8c4 --- /dev/null +++ b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}-patch.bru @@ -0,0 +1,71 @@ +meta { + name: fields/groups/users/{group_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/fields/groups/users/{{group_id}} + body: json + auth: inherit +} + +body:json { + { + "description": "{{group_updated_description}}", + "note": "{{group_updated_note}}", + "title": "{{group_updated_title}}" + } +} + +vars:pre-request { + group_updated_description: {{group_updated_description}} + group_updated_note: {{group_updated_note}} + group_updated_title: {{group_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("group_updated_title")); + }); +} + +example { + name: 200 Response (fields/groups/users/{group_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/groups/users/{{group_id}} + method: PATCH + mode: json + body:json: { + { + "description": "new description", + "note": "", + "title": "new user group" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id}.bru b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}.bru similarity index 60% rename from bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id}.bru rename to bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}.bru index 8b83847..9cb1f77 100644 --- a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users-{group_id}.bru +++ b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users-{group_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users.bru b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users.bru similarity index 70% rename from bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users.bru rename to bruno/joomla-web-services-api/users-fields-groups/fields-groups-users.bru index 8c8e754..3bb6c92 100644 --- a/bruno/Joomla Web Services API/Users Fields Groups/fields-groups-users.bru +++ b/bruno/joomla-web-services-api/users-fields-groups/fields-groups-users.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Fields Groups/folder.bru b/bruno/joomla-web-services-api/users-fields-groups/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Users Fields Groups/folder.bru rename to bruno/joomla-web-services-api/users-fields-groups/folder.bru diff --git a/bruno/Joomla Web Services API/Users Fields/fields-users (POST).bru b/bruno/joomla-web-services-api/users-fields/fields-users-post.bru similarity index 51% rename from bruno/Joomla Web Services API/Users Fields/fields-users (POST).bru rename to bruno/joomla-web-services-api/users-fields/fields-users-post.bru index f128559..d3184a1 100644 --- a/bruno/Joomla Web Services API/Users Fields/fields-users (POST).bru +++ b/bruno/joomla-web-services-api/users-fields/fields-users-post.bru @@ -12,23 +12,23 @@ post { body:json { { - "access": 0, - "context": "", - "default_value": "", - "description": "", + "access": {{user_access}}, + "context": "{{user_context}}", + "default_value": "{{user_default_value}}", + "description": "{{user_description}}", "fieldparams": { - "filter": "", - "maxlength": 0 + "filter": "alnum", + "maxlength": 40 }, - "group_id": 0, - "label": "", - "language": "", - "name": "", - "note": "", + "group_id": {{user_group_id}}, + "label": "{{user_label}}", + "language": "{{user_language}}", + "name": "{{user_name}}", + "note": "{{user_note}}", "params": { "class": "", - "display": "", - "display_readonly": "", + "display": "2", + "display_readonly": "2", "hint": "", "label_class": "", "label_render_class": "", @@ -36,16 +36,53 @@ body:json { "prefix": "", "render_class": "", "show_on": "", - "showlabel": "", + "showlabel": "1", "suffix": "" }, - "required": 0, - "state": 0, - "title": "", - "type": "" + "required": {{user_required}}, + "state": {{user_state}}, + "title": "{{user_title}}", + "type": "{{user_type}}" } } +vars:pre-request { + user_access: 1 + user_context: com_users.user + user_default_value: + user_description: + user_group_id: 0 + user_label: user field + user_language: * + user_name: user-field + user_note: + user_required: 0 + user_state: 1 + user_title: user field + user_type: text +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("user_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("user_title")); + }); +} + example { name: 200 Response (fields/users) description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id} (DELETE).bru b/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Users Fields/fields-users-{field_id} (DELETE).bru rename to bruno/joomla-web-services-api/users-fields/fields-users-{field_id}-delete.bru index e602d7e..a933b1f 100644 --- a/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: fields/users/{field_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}-patch.bru b/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}-patch.bru new file mode 100644 index 0000000..dbdb052 --- /dev/null +++ b/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}-patch.bru @@ -0,0 +1,83 @@ +meta { + name: fields/users/{field_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/fields/users/{{field_id}} + body: json + auth: inherit +} + +body:json { + { + "default_value": "{{field_updated_default_value}}", + "description": "{{field_updated_description}}", + "label": "{{field_updated_label}}", + "name": "{{field_updated_name}}", + "note": "{{field_updated_note}}", + "title": "{{field_updated_title}}", + "type": "{{field_updated_type}}" + } +} + +vars:pre-request { + field_updated_default_value: {{field_updated_default_value}} + field_updated_description: {{field_updated_description}} + field_updated_label: {{field_updated_label}} + field_updated_name: {{field_updated_name}} + field_updated_note: {{field_updated_note}} + field_updated_title: {{field_updated_title}} + field_updated_type: {{field_updated_type}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("field_updated_title")); + }); +} + +example { + name: 200 Response (fields/users/{field_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/fields/users/{{field_id}} + method: PATCH + mode: json + body:json: { + { + "default_value": "", + "description": "Some New Text", + "label": "user field", + "name": "user-field", + "note": "", + "title": "new user field", + "type": "text" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id}.bru b/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Users Fields/fields-users-{field_id}.bru rename to bruno/joomla-web-services-api/users-fields/fields-users-{field_id}.bru index 4b268e6..89a91e4 100644 --- a/bruno/Joomla Web Services API/Users Fields/fields-users-{field_id}.bru +++ b/bruno/joomla-web-services-api/users-fields/fields-users-{field_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Fields/fields-users.bru b/bruno/joomla-web-services-api/users-fields/fields-users.bru similarity index 69% rename from bruno/Joomla Web Services API/Users Fields/fields-users.bru rename to bruno/joomla-web-services-api/users-fields/fields-users.bru index 0cc4e1e..26f1372 100644 --- a/bruno/Joomla Web Services API/Users Fields/fields-users.bru +++ b/bruno/joomla-web-services-api/users-fields/fields-users.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Fields/folder.bru b/bruno/joomla-web-services-api/users-fields/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Users Fields/folder.bru rename to bruno/joomla-web-services-api/users-fields/folder.bru diff --git a/bruno/Joomla Web Services API/Users Groups/folder.bru b/bruno/joomla-web-services-api/users-groups/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Users Groups/folder.bru rename to bruno/joomla-web-services-api/users-groups/folder.bru diff --git a/bruno/joomla-web-services-api/users-groups/users-groups-post.bru b/bruno/joomla-web-services-api/users-groups/users-groups-post.bru new file mode 100644 index 0000000..cb39dc6 --- /dev/null +++ b/bruno/joomla-web-services-api/users-groups/users-groups-post.bru @@ -0,0 +1,75 @@ +meta { + name: users/groups (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/users/groups + body: json + auth: inherit +} + +body:json { + { + "parent_id": {{group_parent_id}}, + "title": "{{group_title}}" + } +} + +vars:pre-request { + group_parent_id: 1 + group_title: Executive +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("group_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("group_title")); + }); +} + +example { + name: 200 Response (users/groups) + description: todo: response object + + request: { + url: {{base_url}}/v1/users/groups + method: POST + mode: json + body:json: { + { + "parent_id": 1, + "title": "Executive" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users Groups/users-groups-{group_id} (DELETE).bru b/bruno/joomla-web-services-api/users-groups/users-groups-{group_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Users Groups/users-groups-{group_id} (DELETE).bru rename to bruno/joomla-web-services-api/users-groups/users-groups-{group_id}-delete.bru index 18dc576..2c95ff8 100644 --- a/bruno/Joomla Web Services API/Users Groups/users-groups-{group_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/users-groups/users-groups-{group_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: users/groups/{group_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Groups/users-groups-{group_id} (PATCH).bru b/bruno/joomla-web-services-api/users-groups/users-groups-{group_id}-patch.bru similarity index 50% rename from bruno/Joomla Web Services API/Users Groups/users-groups-{group_id} (PATCH).bru rename to bruno/joomla-web-services-api/users-groups/users-groups-{group_id}-patch.bru index c778d89..63e92d7 100644 --- a/bruno/Joomla Web Services API/Users Groups/users-groups-{group_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/users-groups/users-groups-{group_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: users/groups/{group_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,10 +12,28 @@ patch { body:json { { - "title": "" + "title": "{{usergroup_updated_title}}" } } +vars:pre-request { + usergroup_updated_title: {{usergroup_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("usergroup_updated_title")); + }); +} + example { name: 200 Response (users/groups/{group_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Groups/users-groups-{group_id}.bru b/bruno/joomla-web-services-api/users-groups/users-groups-{group_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Users Groups/users-groups-{group_id}.bru rename to bruno/joomla-web-services-api/users-groups/users-groups-{group_id}.bru index c25fac8..21a6467 100644 --- a/bruno/Joomla Web Services API/Users Groups/users-groups-{group_id}.bru +++ b/bruno/joomla-web-services-api/users-groups/users-groups-{group_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Groups/users-groups.bru b/bruno/joomla-web-services-api/users-groups/users-groups.bru similarity index 69% rename from bruno/Joomla Web Services API/Users Groups/users-groups.bru rename to bruno/joomla-web-services-api/users-groups/users-groups.bru index 1e076d2..b3d154a 100644 --- a/bruno/Joomla Web Services API/Users Groups/users-groups.bru +++ b/bruno/joomla-web-services-api/users-groups/users-groups.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Levels/folder.bru b/bruno/joomla-web-services-api/users-levels/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Users Levels/folder.bru rename to bruno/joomla-web-services-api/users-levels/folder.bru diff --git a/bruno/joomla-web-services-api/users-levels/users-levels-post.bru b/bruno/joomla-web-services-api/users-levels/users-levels-post.bru new file mode 100644 index 0000000..4e35290 --- /dev/null +++ b/bruno/joomla-web-services-api/users-levels/users-levels-post.bru @@ -0,0 +1,75 @@ +meta { + name: users/levels (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/users/levels + body: json + auth: inherit +} + +body:json { + { + "rules": "{{level_rules}}", + "title": "{{level_title}}" + } +} + +vars:pre-request { + level_rules: {{level_rules}} + level_title: {{level_title}} +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("level_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title matches", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("level_title")); + }); +} + +example { + name: 200 Response (users/levels) + description: todo: response object + + request: { + url: {{base_url}}/v1/users/levels + method: POST + mode: json + body:json: { + { + "rules": "[1]", + "title": "Specialist" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users Levels/users-levels-{level_id} (DELETE).bru b/bruno/joomla-web-services-api/users-levels/users-levels-{level_id}-delete.bru similarity index 82% rename from bruno/Joomla Web Services API/Users Levels/users-levels-{level_id} (DELETE).bru rename to bruno/joomla-web-services-api/users-levels/users-levels-{level_id}-delete.bru index c999984..a67492f 100644 --- a/bruno/Joomla Web Services API/Users Levels/users-levels-{level_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/users-levels/users-levels-{level_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: users/levels/{level_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Levels/users-levels-{level_id} (PATCH).bru b/bruno/joomla-web-services-api/users-levels/users-levels-{level_id}-patch.bru similarity index 50% rename from bruno/Joomla Web Services API/Users Levels/users-levels-{level_id} (PATCH).bru rename to bruno/joomla-web-services-api/users-levels/users-levels-{level_id}-patch.bru index e44bb0e..66dbaa4 100644 --- a/bruno/Joomla Web Services API/Users Levels/users-levels-{level_id} (PATCH).bru +++ b/bruno/joomla-web-services-api/users-levels/users-levels-{level_id}-patch.bru @@ -1,7 +1,7 @@ meta { name: users/levels/{level_id} (PATCH) type: http - seq: 5 + seq: 4 } patch { @@ -12,10 +12,28 @@ patch { body:json { { - "title": "" + "title": "{{level_updated_title}}" } } +vars:pre-request { + level_updated_title: {{level_updated_title}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("title updated", function() { + expect(res.body.data.attributes.title).to.equal(bru.getVar("level_updated_title")); + }); +} + example { name: 200 Response (users/levels/{level_id}) description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Levels/users-levels-{level_id}.bru b/bruno/joomla-web-services-api/users-levels/users-levels-{level_id}.bru similarity index 59% rename from bruno/Joomla Web Services API/Users Levels/users-levels-{level_id}.bru rename to bruno/joomla-web-services-api/users-levels/users-levels-{level_id}.bru index 2e377e1..88711a6 100644 --- a/bruno/Joomla Web Services API/Users Levels/users-levels-{level_id}.bru +++ b/bruno/joomla-web-services-api/users-levels/users-levels-{level_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users Levels/users-levels.bru b/bruno/joomla-web-services-api/users-levels/users-levels.bru similarity index 69% rename from bruno/Joomla Web Services API/Users Levels/users-levels.bru rename to bruno/joomla-web-services-api/users-levels/users-levels.bru index 71fc7e7..b44ccf1 100644 --- a/bruno/Joomla Web Services API/Users Levels/users-levels.bru +++ b/bruno/joomla-web-services-api/users-levels/users-levels.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users/folder.bru b/bruno/joomla-web-services-api/users/folder.bru similarity index 100% rename from bruno/Joomla Web Services API/Users/folder.bru rename to bruno/joomla-web-services-api/users/folder.bru diff --git a/bruno/joomla-web-services-api/users/users-post.bru b/bruno/joomla-web-services-api/users/users-post.bru new file mode 100644 index 0000000..a68b0c9 --- /dev/null +++ b/bruno/joomla-web-services-api/users/users-post.bru @@ -0,0 +1,130 @@ +meta { + name: users (POST) + type: http + seq: 2 +} + +post { + url: {{base_url}}/v1/users + body: json + auth: inherit +} + +body:json { + { + "block": {{user_block}}, + "email": "{{user_email}}", + "groups": [ + 2 + ], + "id": {{user_id}}, + "lastResetTime": "{{user_lastResetTime}}", + "lastvisitDate": "{{user_lastvisitDate}}", + "name": "{{user_name}}", + "params": { + "admin_language": "", + "admin_style": "", + "editor": "", + "helpsite": "", + "language": "", + "timezone": "" + }, + "password": "{{user_password}}", + "password2": "{{user_password2}}", + "registerDate": "{{user_registerDate}}", + "requireReset": {{user_requireReset}}, + "resetCount": {{user_resetCount}}, + "sendEmail": {{user_sendEmail}}, + "username": "{{user_username}}" + } +} + +vars:pre-request { + user_block: 0 + user_email: test@example.org + user_id: 0 + user_lastResetTime: + user_lastvisitDate: + user_name: nnn + user_password: qwerty + user_password2: qwerty + user_registerDate: + user_requireReset: 0 + user_resetCount: 0 + user_sendEmail: 0 + user_username: ad +} + +script:post-response { + if (res.status === 200 && res.body.data) { + bru.setVar("user_id", res.body.data.id); + } +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id, type, attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("type"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name matches", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("user_name")); + }); +} + +example { + name: 200 Response (users) + description: todo: response object + + request: { + url: {{base_url}}/v1/users + method: POST + mode: json + body:json: { + { + "block": 0, + "email": "test@example.org", + "groups": [ + 2 + ], + "id": 0, + "lastResetTime": "", + "lastvisitDate": "", + "name": "nnn", + "params": { + "admin_language": "", + "admin_style": "", + "editor": "", + "helpsite": "", + "language": "", + "timezone": "" + }, + "password": "qwerty", + "password2": "qwerty", + "registerDate": "", + "requireReset": 0, + "resetCount": 0, + "sendEmail": 0, + "username": "ad" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users/users-{user_id} (DELETE).bru b/bruno/joomla-web-services-api/users/users-{user_id}-delete.bru similarity index 81% rename from bruno/Joomla Web Services API/Users/users-{user_id} (DELETE).bru rename to bruno/joomla-web-services-api/users/users-{user_id}-delete.bru index 448f3f9..e0eb648 100644 --- a/bruno/Joomla Web Services API/Users/users-{user_id} (DELETE).bru +++ b/bruno/joomla-web-services-api/users/users-{user_id}-delete.bru @@ -1,7 +1,7 @@ meta { name: users/{user_id} (DELETE) type: http - seq: 4 + seq: 5 } delete { @@ -10,6 +10,12 @@ delete { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/joomla-web-services-api/users/users-{user_id}-patch.bru b/bruno/joomla-web-services-api/users/users-{user_id}-patch.bru new file mode 100644 index 0000000..b5b995d --- /dev/null +++ b/bruno/joomla-web-services-api/users/users-{user_id}-patch.bru @@ -0,0 +1,77 @@ +meta { + name: users/{user_id} (PATCH) + type: http + seq: 4 +} + +patch { + url: {{base_url}}/v1/users/{{user_id}} + body: json + auth: inherit +} + +body:json { + { + "email": "{{user_updated_email}}", + "groups": [ + 2 + ], + "name": "{{user_updated_name}}", + "username": "{{user_updated_username}}" + } +} + +vars:pre-request { + user_updated_email: {{user_updated_email}} + user_updated_name: {{user_updated_name}} + user_updated_username: {{user_updated_username}} +} + +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); + test("name updated", function() { + expect(res.body.data.attributes.name).to.equal(bru.getVar("user_updated_name")); + }); +} + +example { + name: 200 Response (users/{user_id}) + description: todo: response object + + request: { + url: {{base_url}}/v1/users/{{user_id}} + method: PATCH + mode: json + body:json: { + { + "email": "new@example.org", + "groups": [ + 2 + ], + "name": "name", + "username": "username" + } + } + } + + response: { + status: { + code: 200 + text: OK + } + + body: { + type: text + content: ''' + + ''' + } + } +} diff --git a/bruno/Joomla Web Services API/Users/users-{user_id}.bru b/bruno/joomla-web-services-api/users/users-{user_id}.bru similarity index 58% rename from bruno/Joomla Web Services API/Users/users-{user_id}.bru rename to bruno/joomla-web-services-api/users/users-{user_id}.bru index 60f79fb..7dd33d5 100644 --- a/bruno/Joomla Web Services API/Users/users-{user_id}.bru +++ b/bruno/joomla-web-services-api/users/users-{user_id}.bru @@ -10,6 +10,17 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data with id and attributes", function() { + expect(res.body).to.have.property("data"); + expect(res.body.data).to.have.property("id"); + expect(res.body.data).to.have.property("attributes"); + }); +} + example { name: 200 Response description: todo: response object diff --git a/bruno/Joomla Web Services API/Users/users.bru b/bruno/joomla-web-services-api/users/users.bru similarity index 68% rename from bruno/Joomla Web Services API/Users/users.bru rename to bruno/joomla-web-services-api/users/users.bru index 3197498..d5d8cc7 100644 --- a/bruno/Joomla Web Services API/Users/users.bru +++ b/bruno/joomla-web-services-api/users/users.bru @@ -10,6 +10,15 @@ get { auth: inherit } +tests { + test("Status is 200", function() { + expect(res.status).to.equal(200); + }); + test("Response has data", function() { + expect(res.body).to.have.property("data"); + }); +} + example { name: 200 Response description: todo: response object