New Project | Python Library for Coogger API
Repository
https://github.com/coogger/coogger-python
New Projects
My last contribution on utopian-io is that,In this context, the public API was built and I wrote that I increased the speed of the platform.
After that, I decided to make a python library to use it better,as an example, using the SteemConnect I can safely do the upvote bot for the coogger platform of course using sc2py.
What is coogger-python?
Coogger-python is python client of coogger public API.
Features
- Post class was made
In this way, information of any content can be accessed Post class
- User class was made
In this way, information of any users can be accessed User class
- And DictToObject class was made
In this way, can be converted of any dict to python class variable.
Technology Stack
This project using python3 language, and use just requests module.
Roadmap
In fact, with this project my goal is to create a library like steem-python,but I have not done this kind of project before,so I'll try to make a project like this by examining the steem-python library code.
How to contribute?
- You can contribute by telling what features this library might have for now.
GitHub Account
How to use coogger-python
Post class
Post class is used for post, content operations, It can include in the project as below.
from coogger.post import Post
User class
The user class is used to access user information, It can include in the project as below.
from coogger.user import User
DictToObject class
Used to do class items that come as a dict variable
from coogger.ditop import DictToObject
Let's include each class in our project, as below.
from coogger.post import Post
from coogger.user import User
from coogger.ditop import DictToObject
you can filter the contents you want to take with the following parameters.
Parameters
- username
- permlink
- category
- language
- topic
- status # shared / changed / approved /rejected
- dor # duration of read
- views
- read
- mod
exaple:
>>> p = Post(username = "hakancelik",category = "tutorial",status="approved",language = "turkish").post
>>> p = DictToObject(p[0])
>>> p.username
>>> p.modusername
Let's look at user information now.
>>> u = User(username = "hakancelik").user()
#if you are a superuser
>>> u = User(username = "hakancelik").user(sessionid = "your sessionid")
>>> u = DictToObject(u)
>>> u.username
>>> u.about
>>> u.hmanycontent
>>> u.cooggerup_confirmation
>>> u.cooggerup_percent
>>> u.vote_percent
>>> u.beneficiaries
Thanks for the contribution, @hakancelik!
For future contributions I would recommend using something like Grammarly to check your post before posting, as that will probably greatly increase the quality. Also, since we are now using exponential voting, it's more beneficial to submit contributions that contain a lot of work, as your score will be a lot higher, and in turn you will receive an (exponentially) higher reward!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thanks for your advice @amosbastian, I will use it.
Hey @hakancelik
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!