How to write APIs for C++ SDK Appwrite? #84
Locked
pooranjoyb
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Few things to know before writing a new API for the SDK :
Now say we need to write a new api called getTopic which is a part of Messaging module.
For your reference
https://github.com/appwrite/sdk-for-python/blob/503de4b759c7b2611281c019d78e11aed47644f0/appwrite/services/messaging.py#L1881-L1911
For your reference
cpp-sdk-appwrite/include/classes/Messaging.hpp
Line 17 in 4f812f5
For your reference
cpp-sdk-appwrite/src/services/Messaging.cpp
Lines 57 to 78 in 4f812f5
example-file.cpp
to verify it's working.For your reference
cpp-sdk-appwrite/examples/messaging/topics/getTopic.cpp
Lines 1 to 19 in 4f812f5
Makefile
, to compile and test it.For your reference
cpp-sdk-appwrite/Makefile
Lines 249 to 252 in 4f812f5
Now we'll compile and run our API.
# Linux make getTopic
# Windows mingw32-make getTopic
This will create the binary for the API in
./tests/
directory.Finally we'll run our API and debug it further based on my requirement.
cd tests/ ./getTopic
Summary
You’ve now:
🎉 You’ve added a new API to the C++ Appwrite SDK!
Beta Was this translation helpful? Give feedback.
All reactions