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

#65 admin/promo/create #103

Merged
merged 4 commits into from
Oct 20, 2023
Merged

#65 admin/promo/create #103

merged 4 commits into from
Oct 20, 2023

Conversation

twocs
Copy link
Contributor

@twocs twocs commented Oct 7, 2023

Description of the Change

Implemented an endpoint (/api/admin/promo/create) for an admin to create a promo for a note.

Issue or RFC

Issue #65
Documentation: https://misskey.io/api-doc#tag/admin

Alternate Designs

Possible Drawbacks

Verification Process

Unit test for creating a promo.

Release Notes

Created an endpoint for admin to promo a note.

@twocs
Copy link
Contributor Author

twocs commented Oct 9, 2023

@yitsushi I'm participating in Hacktoberfest. If this is approved please confirm whether I can also create endpoints for other issues, such as #44, #20. #17, #16, #13, #68, or #7.

Copy link
Owner

@yitsushi yitsushi left a comment

Choose a reason for hiding this comment

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

Please add an ExampleService_xxxxxxx.

You can add as many endpoints, or fix existing ones as you want 🤣 you can break it down one PR per endpoints or endpoint group to make it clean, but don't mix different kind of endpoints in one PR please.

promo.CreateRequest{NoteID: "8zwxx3cpy9", ExpiresAt: time.Now().Add(86400 * 24 * time.Hour).Unix()},
},
)
}
Copy link
Owner

Choose a reason for hiding this comment

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

Can you please add an example in the test, like other endpoints has? That way we always have simple examples for all endpoints that can be copy pasted if someone wants to play around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have added an example of creating a promo request, following the example.

@coveralls
Copy link

coveralls commented Oct 9, 2023

Coverage Status

coverage: 83.746% (+0.1%) from 83.628% when pulling a02e6e3 on twocs:main into 0bed30a on yitsushi:main.

@twocs
Copy link
Contributor Author

twocs commented Oct 18, 2023

Have updated to fix the golint and golang-ci-lint issues.

@twocs
Copy link
Contributor Author

twocs commented Oct 18, 2023

Have also added an example of creating a promo request.

@yitsushi yitsushi merged commit 30bbd94 into yitsushi:main Oct 20, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants