Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

API: Add Post API#256

Open
AnnsAnns wants to merge 14 commits into
animenotifier:gofrom
AnnsAnns:API
Open

API: Add Post API#256
AnnsAnns wants to merge 14 commits into
animenotifier:gofrom
AnnsAnns:API

Conversation

@AnnsAnns

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

This is a long-term draft for a Post API. The current ETA is late 2020

💡 Motivation and Context

Currently something I'm missing the most [Besides Manga support] is being able to integrate/update notify.moe through third-party applications. This draft plans to add all features needed to allow exactly that.

🔮 Next steps

Progress will always be updated on my forks project board: https://github.com/tumGER/notify.moe/projects/1

@AnnsAnns AnnsAnns changed the title Add Token Generation API: Add Post API Oct 29, 2020
Comment thread arn/User.go Outdated
Comment thread server/New.go
func GetUserFromToken(token uuid.UUID) *arn.User {
user := &arn.User{}

for user = range arn.StreamUsers() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could replace this O(n) loop with an O(1) lookup using a new collection in the DB ("TokenToUser") later on.

Otherwise this can become a huge bottleneck.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I originally wanted to implement this in a better way but I'm honestly too unfamiliar with nano so I didn't want to touch what I was unsure about.

Comment thread server/tokenapi/Main.go
Comment thread server/tokenapi/AnimeList.go Outdated
Comment thread server/tokenapi/Main.go
@AnnsAnns AnnsAnns marked this pull request as ready for review November 7, 2020 17:48
@AnnsAnns

AnnsAnns commented Nov 7, 2020

Copy link
Copy Markdown
Contributor Author

The post API is now technically fully functional, that's why I'm changing the PR status from "draft" to "open".

There are however 3 important things that should be addressed before merging this PR:

  1. The frontend under "pages/API.pixy" is currently awful, because I'm unfamiliar with the whole frontend. I'll definitely need help from you there.
  2. There is no documentation yet, I'll however commit that after/while this PR is getting reviewed.
  3. I've decided to stick with Gjson because I majorly dislike the standard json library [And the whole code is build around a dynamic JSON, which makes it even worse to handle with the standard library]. Besides that, Gjson makes the whole code a lot easier to understand. If needed, this has to be changed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants