This project has been archived by its maintainers, and is no longer receiving any updates.
simpleverse
API wrapper for versatileapi in Python
Install
pip install simpleverse
CLI
Workaround for simpleverse's CLI
$ simv -h
usage: simv [-h]
{create_like,cl,create_user,cu,update_user,uu,get_like,gl,get_image,gi,get_post,gp,get_user,gu,submit_post,sp,submit_image,si,repl,rl}
...
Simple command for sending requests to versatileapi
positional arguments:
{create_like,cl,create_user,cu,update_user,uu,get_like,gl,get_image,gi,get_post,gp,get_user,gu,submit_post,sp,submit_image,si,repl,rl}
create_like (cl)
create_user (cu)
update_user (uu)
get_like (gl)
get_image (gi)
get_post (gp)
get_user (gu)
submit_post (sp)
submit_image (si)
repl (rl)
optional arguments:
-h, --help show this help message and exit
$ simv cu -n eggplants -d "https://github.com/eggplants/simpleverseを書きました。"
b6e4ae19fc2c59ce55c726de44a40dc825faa04d
$ simv gu -u b6e4ae19fc2c59ce55c726de44a40dc825faa04d
{
'id': 'b6e4ae19fc2c59ce55c726de44a40dc825faa04d',
'_created_at': '2021-09-19T04:35:11.765+00:00',
'_updated_at': '2021-09-19T04:35:11.765+00:00',
'_user_id': 'b6e4ae19fc2c59ce55c726de44a40dc825faa04d',
'description': 'https://github.com/eggplants/simpleverseを書きました。',
'name': 'eggplants'
}
$ simv sp "コレはテストです"
00210022-a452-4be7-a873-d369b1bf8d70
$ simv gp -p 00210022-a452-4be7-a873-d369b1bf8d70
{
'id': '00210022-a452-4be7-a873-d369b1bf8d70',
'_created_at': '2021-09-19T04:45:42.017+00:00',
'_updated_at': '2021-09-19T04:45:42.017+00:00',
'_user_id': 'b6e4ae19fc2c59ce55c726de44a40dc825faa04d',
'text': 'コレはテストです'
}
$ simv uu -n eggplants -d "こんにちは。https://github.com/eggplants/simpleverseを書きました。"
b6e4ae19fc2c59ce55c726de44a40dc825faa04d
$ simv gu -u b6e4ae19fc2c59ce55c726de44a40dc825faa04d
{
'id': 'b6e4ae19fc2c59ce55c726de44a40dc825faa04d',
'_created_at': '2021-09-19T04:35:11.765+00:00',
'_updated_at': '2021-09-19T04:46:53.659+00:00',
'_user_id': 'b6e4ae19fc2c59ce55c726de44a40dc825faa04d',
'description': 'こんにちは。https://github.com/eggplants/simpleverseを書きました。',
'name': 'eggplants'
}
# All posts by a specific user
$ simv gp | jq '.[]|select(._user_id=="b6e4ae19fc2c59ce55c726de44a40dc825faa04d")'
{
"_created_at": "2021-09-18T18:50:33.316+00:00",
"_updated_at": "2021-09-18T18:50:33.316+00:00",
"_user_id": "b6e4ae19fc2c59ce55c726de44a40dc825faa04d",
"id": "12d7d6c5-1412-4299-9fe0-4e11c5261aab",
"text": "test"
}
{
"_created_at": "2021-09-19T04:10:35.054+00:00",
"_updated_at": "2021-09-19T04:10:35.054+00:00",
"_user_id": "b6e4ae19fc2c59ce55c726de44a40dc825faa04d",
"id": "81dd0981-de48-47b6-bb81-2bc33579d0d1",
"text": "hello woooooooold!"
}
{
"_created_at": "2021-09-19T04:14:44.837+00:00",
"_updated_at": "2021-09-19T04:14:44.837+00:00",
"_user_id": "b6e4ae19fc2c59ce55c726de44a40dc825faa04d",
"id": "b281751f-03a9-47b0-ace1-2dc1be620a2a",
"text": "hello woooooooold!\n(this post submitted by https://git.io/JzmhD)"
}
{
"_created_at": "2021-09-19T04:39:57.808+00:00",
"_updated_at": "2021-09-19T04:39:57.808+00:00",
"_user_id": "b6e4ae19fc2c59ce55c726de44a40dc825faa04d",
"id": "d2f875a4-540e-4332-ae4e-5ac80d435449",
"text": "a"
}
{
"_created_at": "2021-09-19T04:45:42.017+00:00",
"_updated_at": "2021-09-19T04:45:42.017+00:00",
"_user_id": "b6e4ae19fc2c59ce55c726de44a40dc825faa04d",
"id": "00210022-a452-4be7-a873-d369b1bf8d70",
"text": "コレはテストです"
}
Library
Classes and its methods of simpleverse
from simpleverse import (
CreateLike,
CreateUser,
GetImageInfo,
GetLikeInfo,
GetPostInfo,
GetUserInfo,
SubmitImage,
SubmitPost,
)
class CreateLike(BaseVerseRequests):
def create_like(self, post_id: str, like_count: int) -> str: ...
class CreateUser(BaseVerseRequests):
def create_user(self, name: str, description: str) -> str: ...
def update_user(self, name: str, description: str) -> str: ...
class GetImageInfo(BaseVerseRequests):
def get_image_all(self) -> List[ImageInfo]: ...
def get_image(self, image_id: str) -> ImageInfo: ...
def get_image_OData(
self,
filter_: Optional[str] = ...,
order_by: Optional[str] = ...,
limit: Optional[int] = ...,
skip: Optional[int] = ...,
) -> List[ImageInfo]: ...
class GetLikeInfo(BaseVerseRequests):
def get_like_all(self) -> List[LikeInfo]: ...
def get_like(self, post_id: str) -> LikeInfo: ...
def get_like_OData(
self,
filter_: Optional[str] = ...,
order_by: Optional[str] = ...,
limit: Optional[int] = ...,
skip: Optional[int] = ...,
) -> List[LikeInfo]: ...
class GetPostInfo(BaseVerseRequests):
def get_post_all(self) -> List[PostInfo]: ...
def get_post(self, post_id: str) -> PostInfo: ...
def get_post_OData(
self,
filter_: Optional[str] = ...,
order_by: Optional[str] = ...,
limit: Optional[int] = ...,
skip: Optional[int] = ...,
) -> List[PostInfo]: ...
class GetUserInfo(BaseVerseRequests):
def get_user_all(self) -> List[UserInfo]: ...
def get_user(self, user_id: str) -> UserInfo: ...
def get_user_OData(
self,
filter_: Optional[str] = ...,
order_by: Optional[str] = ...,
limit: Optional[int] = ...,
skip: Optional[int] = ...,
) -> List[UserInfo]: ...
class SubmitImage(BaseVerseRequests):
def submit_image(self, image_data: str, post_id: str) -> str: ...
class SubmitPost(BaseVerseRequests):
def submit_post(
self,
text: str,
rep_user_id: Optional[str] = ...,
rep_post_id: Optional[str] = ...,
test: bool = ...,
) -> str: ...
Links
Docs
- HawkClaws/versatileapi
- API generator
- エンジニア・プログラマにしか使えない SNS を作ってみた話
- Author's article
- Swagger
- Versatileapi's schema in Swagger
WebUI Clients (deploying somewhare)
- chamegashi/Engineer_SNS_Test_Site
- dala00/engineer-sns-client
- hir0o/sns-for-engineer
- lightwill/sns
- Posts of spesific user:
https://lightwill.tokyo/dev/sns/?selectUserId={userid}
- Posts of spesific user:
- nison/json-sns-viewer
- mehm8128/twitter-for-engineer
- standard-software/programmer-only-sns
- voidproc/engineer-sns-client
- yosket/engineer-sns
CUI Clients
- daiji-tsutsui/Beelzebub
- Ruby
- elderica/esns
- Racket
- javaboy-github/only-programer-sns-client
- Golang
- nyanpyou106/versatileapisns_client
- Python
License
MIT
Metadata
Release files for simpleverse 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simpleverse-0.9.0.tar.gz | 11.6 kB | Without provenance | Details for simpleverse-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simpleverse-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for simpleverse-0.9.0-py3-none-any.whl |
Total release size: 25.2 kB
Release files / simpleverse-0.9.0.tar.gz
| Download URL | simpleverse-0.9.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d474b447ddfb11c8e0dfef9deed0ee986c923b08bbfedeb0a14ce7dfeee11f59
|
|
BLAKE2b-256 checksum How to use checksums |
dd1c642e2ed41b52c5d0d1459b40db99fc9545497ac0c6e32e8f1f77e9025d2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Release files / simpleverse-0.9.0-py3-none-any.whl
| Download URL | simpleverse-0.9.0-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b8f32abb5cc18ee43ff63e0c057104d451533f4371492cd0b40b6ee0e0a87f9
|
|
BLAKE2b-256 checksum How to use checksums |
bad5cc7362deda56172db7e1fccac7a792c415293cc420bf0e32b98cd6acd6ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Security for simpleverse 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.