From 1509e231a6c7b5b9614da9ba4827442b16d46296 Mon Sep 17 00:00:00 2001 From: Abhi Date: Wed, 15 Jan 2020 23:36:23 +0530 Subject: [PATCH] add support for Bitbucket API --- agithub/Bitbucket.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 agithub/Bitbucket.py diff --git a/agithub/Bitbucket.py b/agithub/Bitbucket.py new file mode 100644 index 0000000..a376d31 --- /dev/null +++ b/agithub/Bitbucket.py @@ -0,0 +1,20 @@ +# Copyright 2012-2016 Jonathan Paugh and contributors +# See COPYING for license details +from agithub.base import API, ConnectionProperties, Client + + +class Bitbucket(API): + """ + Bitbucket API + + >>> bt = Bitbucket() + >>> bt.hook_events.get() + """ + def __init__(self, *args, **kwargs): + props = ConnectionProperties( + api_url='api.bitbucket.org', + url_prefix='/2.0', + secure_http=True, + ) + self.setClient(Client(*args, **kwargs)) + self.setConnectionProperties(props)