Skip to content

Commit

Permalink
Merge pull request googleapis#153 from Keroth/patch-1
Browse files Browse the repository at this point in the history
Updatet package name in readme
  • Loading branch information
Alejandro Casanovas authored Dec 13, 2018
2 parents ebcf908 + 4a4d2a5 commit dd6218c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The result is a package that provides a lot of the Microsoft Graph and Office 36
This is for example how you send a message:

```python
from pyo365 import Account
from O365 import Account

credentials = ('client_id', 'client_secret')

Expand Down Expand Up @@ -68,7 +68,7 @@ What follows is kind of a wiki... but you will get more insights by looking at t


## Install
pyo365 is available on pypi.org. Simply run `pip install pyo365` to install it.
pyo365 is available on pypi.org. Simply run `pip install O365` to install it.

Project dependencies installed by pip:
- requests
Expand Down Expand Up @@ -106,7 +106,7 @@ You can implement your own protocols by inheriting from `Protocol` to communicat

You can instantiate protocols like this:
```python
from pyo365 import MSGraphProtocol
from O365 import MSGraphProtocol

# try the api version beta of the Microsoft Graph endpoint.
protocol = MSGraphProtocol(api_version='beta') # MSGraphProtocol defaults to v1.0 api version
Expand Down Expand Up @@ -174,7 +174,7 @@ Then the user can request access to one or more of this resources by providing s
For example your application can have Calendar.Read, Mail.ReadWrite and Mail.Send permissions, but the application can request access only to the Mail.ReadWrite and Mail.Send permission.
This is done by providing scopes to the connection object like so:
```python
from pyo365 import Connection
from O365 import Connection

credentials = ('client_id', 'client_secret')

Expand Down Expand Up @@ -248,7 +248,7 @@ You can manually authenticate by using a single `Connection` instance as describ

Create an `Account` instance and authenticate using the `authenticate` method:
```python
from pyo365 import Account
from O365 import Account

account = Account(credentials=('client_id', 'client_secret'))
result = account.authenticate(scopes=['basic', 'message_all']) # request a token for this scopes
Expand All @@ -261,7 +261,7 @@ You can manually authenticate by using a single `Connection` instance as describ
2. `oauth_authentication_flow`:

```python
from pyo365 import oauth_authentication_flow
from O365 import oauth_authentication_flow

result = oauth_authentication_flow('client_id', 'client_secret', ['scopes_required'])
```
Expand All @@ -273,7 +273,7 @@ But you can also work only with the pieces you want.

For example, instead of:
```python
from pyo365 import Account
from O365 import Account

account = Account(('client_id', 'client_secret'))
message = account.new_message()
Expand All @@ -285,7 +285,7 @@ mailbox = account.mailbox()
You can work only with the required pieces:

```python
from pyo365 import Connection, MSGraphProtocol, Message, MailBox
from O365 import Connection, MSGraphProtocol, Message, MailBox

my_protocol = MSGraphProtocol()
con = Connection(('client_id', 'client_secret'))
Expand All @@ -302,7 +302,7 @@ It's also easy to implement a custom Class.
Just Inherit from `ApiComponent`, define the endpoints, and use the connection to make requests. If needed also inherit from Protocol to handle different comunications aspects with the API server.

```python
from pyo365.utils import ApiComponent
from O365.utils import ApiComponent

class CustomClass(ApiComponent):
_endpoints = {'my_url_key': '/customendpoint'}
Expand Down

0 comments on commit dd6218c

Please sign in to comment.