Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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
Appearance settings

Mediumroast for GitHub API/SDK

License

NotificationsYou must be signed in to change notification settings

mediumroast/mediumroast_py

Repository files navigation

Introduction

This Python package provides a Software Development Kit (SDK) for interacting with Mediumroast for GitHub. It is used internally by Mediumroast, Inc. and meant for developers to make use of.

Notice

The SDK is in active development and is subject to change. The SDK is not yet stable and should not be used in production environments.

Installation

To install the package, you can use pip:

pip install mediumroast_py

Usage

To use the package, you will need to import themediumroast_py modules and classes. The package provides three main classes for interacting with objects:Companies,Interactions, andUsers.

Authentication

To use the package, you will need to authenticate with the Mediumroast API using theGitHubAuth class. Here is an example of how to authenticate with the Mediumroast API using a GitHub App installation and a private key file. You will need to set theMR_CLIENT_ID,MR_APP_ID, andYOUR_INSTALLATION_ID environment variables to the appropriate values for your GitHub App installation. You will also need to set theYOUR_PEM_FILE environment variable to the path of your private key file. Here is an example of how to authenticate with the Mediumroast API using a GitHub App installation and a private key file.

frommediumroast_py.apiimportCompanies,Interactions,Usersfrommediumroast_py.api.authorizeimportGitHubAuthauth=GitHubAuth(env={'clientId':os.getenv('MR_CLIENT_ID')})token=auth.get_access_token_pem(os.getenv('YOUR_PEM_FILE'),os.getenv('MR_APP_ID'),os.getenv('YOUR_INSTALLATION_ID'))

Companies

TheCompanies class provides methods for interacting with companies in Mediumroast. You can use theget_all method to get information about all companies.

company_ctl=Companies(token_info['token'],os.getenv('YOUR_ORG') ,process_name)companies=company_ctl.get_all()

Interactions

TheInteractions class provides methods for interacting with interactions in Mediumroast. You can use theget_all method to get information about all interactions.

interaction_ctl=Interactions(token_info['token'],os.getenv('YOUR_ORG') ,process_name)interactions=interaction_ctl.get_all()

Issues

If you encounter any issues with the SDK, please report them on themediumroast_py issues page.

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp