Skip to content

Python SDK, how to use feeds_api.create_feed_document() #560

@hobbsd

Description

@hobbsd

I'm struggling to figure out how to get this method to work. The code and code docs are not very readable/pythonic. Isn't the required argument body supposed to be the content of your JSON feed?

The docstring in the code says, :param CreateFeedDocumentSpecification body: Specifies the content type for the createFeedDocument operation. (required), which suggests to me a string like 'application/json' (and the CreateFeedDocumentSpecification does specify string), but that seems wrong. Following the function calls, later in the code it says body is :param body: Request body, and then further along :param body: request json body, for 'application/json'. Further along there is a json.dumps(body), so body should probably start out as a dict to be converted to JSON before transmitting. But called either with body as a JSON string or as a dict, and the server returns:

    {
      "code": "InvalidInput",
      "message": "One or more required parameters missing",
      "details": "contentType;"
    }

And the function doesn't allow for a content_type or contentType argument -- it looks like the function sets that in the headers itself. Has anyone gotten this to work?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions