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

Implement JSONPlaceholder REST APIs gRPC Methods #40

Open
amitksingh1490 opened this issue Nov 28, 2024 · 7 comments · May be fixed by #50
Open

Implement JSONPlaceholder REST APIs gRPC Methods #40

amitksingh1490 opened this issue Nov 28, 2024 · 7 comments · May be fixed by #50

Comments

@amitksingh1490
Copy link
Contributor

Posts

REST Endpoints:

  • GET /posts : Retrieve all posts. Accepts filter in Query Param like https://jsonplaceholder.typicode.com/posts?userId=1
  • GET /posts/{id} : Retrieve a single post by ID.
  • POST /posts : Create a new post.
  • PUT /posts/{id} : Update a post by ID.
  • DELETE /posts/{id} : Delete a post by ID.

gRPC Service Definition:

service PostService {
  rpc ListPosts(Filter) returns (PostList);
  rpc GetPost(PostRequest) returns (Post);
  rpc CreatePost(Post) returns (PostResponse);
  rpc UpdatePost(Post) returns (PostResponse);
  rpc DeletePost(PostRequest) returns (DeleteResponse);
}

Users

REST Endpoints:

  • GET /users : Retrieve all users. accepts queryparams like https://jsonplaceholder.typicode.com/users?id=1&id=2
  • GET /users/{id} : Retrieve a single user by ID.
  • POST /users : Create a new user.
  • PUT /users/{id} : Update a user by ID.
  • DELETE /users/{id} : Delete a user by ID.

gRPC Service Definition:

service UserService {
  rpc ListUsers(Filter) returns (UserList);
  rpc GetUser(UserRequest) returns (User);
  rpc CreateUser(User) returns (UserResponse);
  rpc PatchUser(PatchUserRequest) returns (UserResponse);
  rpc DeleteUser(UserRequest) returns (DeleteResponse);
}
  • Define Proto Files: Create .proto files containing these service and message definitions.
  • Implement Server Logic: Develop server-side handlers for each gRPC method.
  • Testing: Ensure each gRPC method correctly maps to the expected functionality of the original REST API.
@amitksingh1490
Copy link
Contributor Author

/bounty 50$

Copy link

algora-pbc bot commented Nov 28, 2024

💎 $50 bounty • Tailcall Inc.

Steps to solve:

  1. Start working: Comment /attempt #40 with your implementation plan
  2. Submit work: Create a pull request including /claim #40 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

🙏 Thank you for contributing to tailcallhq/rust-grpc!
🧐 Checkout our guidelines before you get started.
💵 More about our bounty program.

Attempt Started (GMT+0) Solution
🔴 @kaf-lamed-beyt Nov 28, 2024, 8:20:13 PM WIP
🟢 @Gmin2 Nov 29, 2024, 4:54:21 PM #50

@ssddOnTop
Copy link
Member

I guess I had a PR for this

@kaf-lamed-beyt
Copy link

kaf-lamed-beyt commented Nov 28, 2024

/attempt #40

Algora profile Completed bounties Tech Active attempts Options
@kaf-lamed-beyt 9 bounties from 4 projects
JavaScript, HTML,
TypeScript & more
Cancel attempt

@Gmin2
Copy link

Gmin2 commented Nov 29, 2024

/attempt #40

Algora profile Completed bounties Tech Active attempts Options
@Gmin2    3 tailcallhq bounties
+ 11 bounties from 6 projects
TypeScript, JavaScript,
Go & more
Cancel attempt

Copy link

algora-pbc bot commented Nov 29, 2024

Note

The user @kaf-lamed-beyt is already attempting to complete issue #40 and claim the bounty. We recommend checking in on @kaf-lamed-beyt's progress, and potentially collaborating, before starting a new solution.

@Gmin2 Gmin2 linked a pull request Nov 29, 2024 that will close this issue
Copy link

algora-pbc bot commented Nov 29, 2024

💡 @Gmin2 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants