Set or remove the current user's rating reaction to a repository identified by UUID.
Request
PUT
https://api.sourcecraft.tech/repos/id:{repo_id}/rating
Path parameters
|
Name |
Description |
|
repo_id |
Type: string Example: `` |
Body
application/json
{
"reaction": "none"
}
|
Name |
Description |
|
reaction |
Type: RepositoryRatingReaction.Type
Enum: |
RepositoryRatingReaction.Type
- none: Remove the current user's rating reaction.
- positive_low: A low positive rating reaction. Corresponds to Like in the SourceCraft interface.
- positive_medium: A medium positive rating reaction. Corresponds to Heart in the SourceCraft interface.
- positive_high: A high positive rating reaction. Corresponds to Diamond in the SourceCraft interface.
Type: string
Enum: none, positive_low, positive_medium, positive_high
Responses
200 OK
A successful response.
Body
application/json
{
"reaction": {
"type": "none",
"updated_at": "2025-01-01T00:00:00Z"
}
}
|
Name |
Description |
|
reaction |
Type: RepositoryRatingReaction A user's reaction that contributes to a repository rating. Example
|
RepositoryRatingReaction
A user's reaction that contributes to a repository rating.
|
Name |
Description |
|
type |
Type: RepositoryRatingReaction.Type
Enum: |
|
updated_at |
Type: string<date-time> Example: |
Example
{
"type": "none",
"updated_at": "2025-01-01T00:00:00Z"
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": null
}
|
Name |
Description |
|
details |
Type: unknown Example: |
|
error_code |
Type: string Example: |
|
message |
Type: string Example: |
|
request_id |
Type: string Example: |