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

Add API documentation for set_original_claim #1944

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions doc/api-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,36 @@ As we can see above, the `geolocation` task response should be a valid [GeoJSON]

The `url` and `quote` can't be both defined at the same time. It's one or the other. If the `quote` field is set, it means you're creating a claim. If the `url` field is set, it means you're creating a report of type "link".

## Create original claim when creating media

When using `createProjectMedia` to create new project media, you can use the `set_original_claim` field to import a URL as the original claim. This URL can be in the following formats:

1. Video URL: This will create a video as the original claim.
2. Audio URL: This will create an audio as the original claim.
3. Image URL: This will create a picture/image as the original claim.
4. Normal URL: A Link will be created as the original claim
5. If the value in `set_original_claim` is not a URL, then the original claim will be created in plain-text.

Here is an example of how to use this field:

_Query_
```graphql
mutation {
createProjectMedia(input: {
project_id: 4,
set_original_claim: "https://someurl.com/somefile.mp3"
}) {
project_media {
title
type
url
}
}
}
```

This example will create an audio as the original claim.

## Updating media

We can update media using the GraphQL (Base 64) id. In the example below, we change the description of a media:
Expand Down
Loading