Skip to content

Conversation

@ChillarAnand
Copy link
Member

closes #462

@coveralls
Copy link

coveralls commented Jul 7, 2016

Coverage Status

Coverage increased (+0.5%) to 72.506% when pulling 1327e09 on ChillarAnand:api into a6c7031 on pythonindia:master.

@kracekumar
Copy link
Member

Can you add sample request and response ?

class Meta:
model = Proposal
fields = ('id', 'title', 'author', 'slug', 'description', 'target_audience',
'prerequisites', 'content_urls', 'speaker_info', 'speaker_links', 'comments')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add Proposal Type and section ?

@ChillarAnand
Copy link
Member Author

Sample RR.

GET /api/v1/proposals/?conference=a-porro-conference&page=2
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS

{
    "count": 3,
    "next": null,
    "previous": "http://127.0.0.1:8000/api/v1/proposals/?conference=a-porro-conference",
    "results": [
        {
            "id": 25,
            "title": "A porro - type 0 - section 0 -1",
            "author": "fsdf",
            "slug": "sadfaaaaaaaaaaaaaaaaaaaaa-2",
            "description": "sdf",
            "target_audience": 3,
            "prerequisites": "",
            "content_urls": "",
            "speaker_info": "",
            "speaker_links": "",
            "comments": [
                {
                    "commenter": "fpqwe",
                    "comment": "good "
                },
                {
                    "commenter": "fsdf",
                    "comment": "very good"
                }
            ]
        }
    ]
}
GET /api/v1/proposals/?conference=foo
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS

{
    "count": 0,
    "next": null,
    "previous": null,
    "results": []
}

@coveralls
Copy link

coveralls commented Jul 9, 2016

Coverage Status

Changes Unknown when pulling 1362ae0 on ChillarAnand:api into * on pythonindia:master*.

@coveralls
Copy link

coveralls commented Jul 9, 2016

Coverage Status

Changes Unknown when pulling 1362ae0 on ChillarAnand:api into * on pythonindia:master*.

@coveralls
Copy link

coveralls commented Jul 11, 2016

Coverage Status

Coverage increased (+0.5%) to 72.42% when pulling 0899b26 on ChillarAnand:api into e5ee22b on pythonindia:master.

@coveralls
Copy link

coveralls commented Jul 11, 2016

Coverage Status

Coverage increased (+0.5%) to 72.42% when pulling 49f4d45 on ChillarAnand:api into e5ee22b on pythonindia:master.

@coveralls
Copy link

coveralls commented Jul 24, 2016

Coverage Status

Coverage decreased (-0.8%) to 71.101% when pulling 4f91634 on ChillarAnand:api into e5ee22b on pythonindia:master.

@coveralls
Copy link

coveralls commented Jul 24, 2016

Coverage Status

Coverage decreased (-0.7%) to 71.156% when pulling adcf5b3 on ChillarAnand:api into e5ee22b on pythonindia:master.

"content_urls": "",
"speaker_info": "",
"speaker_links": "",
"comments": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend not to add the comments in the list api, either a separate endpoint to fetch the comments of a proposal or can be included in the detail of a proposal.

e.g. /proposals/12/comments which will be paginated resource.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We can remove from list api. I guess we can add to proposal detail api.


class StandardResultsSetPagination(PageNumberPagination):
page_size = 2
page_size_query_param = 'page'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should follow a global configuration unless an exception is required.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@coveralls
Copy link

coveralls commented Oct 2, 2016

Coverage Status

Coverage decreased (-2.9%) to 68.985% when pulling 6494336 on ChillarAnand:api into e5ee22b on pythonindia:master.

@kracekumar
Copy link
Member

@ChillarAnand Is all the changes made?

@ChillarAnand
Copy link
Member Author

Yes @kracekumar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add proposal API

5 participants