Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Unofficial Vala API for posting to Ghost blogshttps://ghost.org/docs/api/v3/admin/

License

NotificationsYou must be signed in to change notification settings

ThiefMD/ghost-vala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnofficialGhost API client library for Vala. Still a work in progress.

This is a simple API for publishing fromThiefMD, and will hopefully become fully compatible with time.

Compilation

I recommend includingghost-vala as a git submodule and addingghost-vala/src/Ghost.vala to your sources list. This will avoid packaging conflicts and remote build system issues until I learn a better way to suggest this.

For libsoup3, useghost-vala/src/Ghost3.vala.

Requirements

mesonninja-buildvalaclibgtk-3-dev

Building

meson buildcd buildmeson configure -Denable_examples=trueninja./examples/hello-ghost

Examples require update to username and password, don't check this in

string user = "username";string password = "password";

Quick Start

Authentication

Ghost.Client client=Client (url, username, password);if (client.authenticate ()) {    print ("You logged in!");}

Simple Post

Ghost.Client client=Client (url, username, password);string id;string slug;if (client.create_post_simple (out slug,out id,"Hello world","<p>Hello ghost</p>")){    print ("New post at%s/%s", url, slug);}

Simple Image Upload

Ghost.Client client=Client (url, username, password);string id;string slug;if (client.upload_image_simple (out file_url,"/home/user/Pictures/photo.jpeg")){    print ("New image at%s", file_url);}

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp