Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot POST /apps #151

Open
BrunoQuaresma opened this issue Feb 3, 2017 · 2 comments
Open

Cannot POST /apps #151

BrunoQuaresma opened this issue Feb 3, 2017 · 2 comments

Comments

@BrunoQuaresma
Copy link

I have

## Apps [/apps]

### Get All Apps [GET]

+ Response 200 (application/json)

        {
            "items": [
                {
                    "id": 1,
                    "name": "My Favorite App",
                    "impressions": 4324,
                    "clicks": 100,
                    "ctr": 0.25,
                    "earnings": 19500.50,
                    "rpm": 195.50,
                    "images": {
                        "thumb": "http://www.freeiconspng.com/uploads/foursquare-icon-2.png"
                    },
                    "links": [
                        { "rel": "self", "href": "http://publisherapps.apiblueprint.org/app/1", "options": ["PUT", "DELETE"] },
                        { "rel": "statistics", "href": "http://publisherapps.apiblueprint.org/app/1/statistics" },
                        { "rel": "ad_units", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units" },
                        { "rel": "ad_units_categories", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units/categories" },
                        { "rel": "ad_units_types", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units/types" },
                        { "rel": "ad_sources", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units/sources" }
                    ]
                },
                {
                    "id": 2,
                    "name": "Amazing App",
                    "impressions": 5354,
                    "clicks": 34,
                    "ctr": 0.15,
                    "earnings": 6500.37,
                    "rpm": 65.37,
                    "images": {
                        "thumb": "https://cdn0.iconfinder.com/data/icons/social-flat-rounded-rects/512/whatsapp-512.png"
                    },
                    "links": [
                        { "rel": "self", "href": "http://publisherapps.apiblueprint.org/app/2", "options": ["PUT", "DELETE"] },
                        { "rel": "statistics", "href": "http://publisherapps.apiblueprint.org/app/2/statistics" },
                        { "rel": "ad_units", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units" },
                        { "rel": "ad_units_categories", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units/categories" },
                        { "rel": "ad_units_types", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units/types" },
                        { "rel": "ad_sources", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units/sources" }
                    ]
                }
            ],
            "links": [
                { "rel": "create", "href": "http://publisherapps.apiblueprint.org/app" }
            ]
        }

### Create New App [POST]

+ Attributes
    + name (string)
    + image_url(string)
    + app_category_id (number)
    + operational_system_id (number)
    + geofence_sleep_time (number) - Refresh monitoring locales

+ Response 200 (application/json)

        {
            "id": 3,
            "url": "https://play.google.com/store/apps/details?id=com.schibsted.bomnegocio.androidApp&hl=pt_BR",
            "name": "Olx",
            "app_category_id": 1,
            "operational_system_id": 1,
            "geofence_sleep_time": 8400,
            "links": [
                { "rel": "self", "href": "http://publisherapps.apiblueprint.org/app/3", "options": ["PUT", "DELETE"] },
                { "rel": "statistics", "href": "http://publisherapps.apiblueprint.org/app/3/statistics" },
                { "rel": "ad_units", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units" },
                { "rel": "ad_units_categories", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units/categories" },
                { "rel": "ad_units_types", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units/types" },
                { "rel": "ad_sources", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units/sources" }
            ]
        }

Get the apps works, but POST not. Why?

ps.: I run the drakov using.: ./node_modules/.bin/drakov -f apiary.apib -p 4007 --autoOptions

@cyberduck-magento
Copy link

Also having this issue.

@ehuebner
Copy link

ehuebner commented Aug 7, 2018

Post needs a request body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants