Source code for webmentiontools.webmentionio

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Provides interface to interact with https://webmention.io/
"""

import json
import requests


[docs]class WebmentionIO(): """ Wrapper for interacting. Example: webmention_io_token = None # or set your token. wio = WebmentionIO(webmention_io_token) ret = wio.links_to_url('http://indiewebcamp.com/webmention') if not ret: print(wio.error) else: for l in ret['links']: print(l['id'], l['source'], l['verified_date']) """ def __init__(self, access_token=None): self.access_token = access_token self.api_endpoint = 'https://webmention.io/api' self.error = None