Automattic / liveblog

Liveblogging done right. Using WordPress.

Home Page:https://wordpress.org/plugins/liveblog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Insert

bambryan opened this issue · comments

Is there a way to insert a new entry via api? I use this code for another plugin to send emails when my script is finishing it's run.

headers = {'Content-Type': 'application/json',}
params = (('action', 'newsletters_api'),)
data = '{"api_method":"send_newsletter","api_key":"key","api_data":{"history_id":"1234"}}'
r = requests.post('/wp-admin/admin-ajax.php', headers=headers, params=params, data=data)