Code Monkey home page Code Monkey logo

pyucwa's Introduction

pyucwa

image

image

Documentation Status

Skype for Business UCWA API client

Usage

Setup your tenant

Follow the steps in https://msdn.microsoft.com/en-us/office/office365/howto/add-common-consent-manually

Enter the pool for your tenant by visiting the URL : https://webdir.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=parliamentfunksterhotmail.onmicrosoft.com with your domain.

Create a file config.yml with similar details

redirect_uri: "http://127.0.0.1:5000"
client_id: "0b78a9be-6b65-1234-b8e6-a0b21a8672c3"
secret: "jPpYkK+sdf3423r="
domain: "mydomain.onmicrosoft.com"
app_id: "https://mydomain.onmicrosoft.com/bot"

Start the web server

python -m ucwa.http

Run a login session to get a token for the application

python authhelper.py

This will open the browser, get you to login to Office 365 and then create an instance session with a UCWA server in O365/Skype for Business online

You can then run app.py to stream events

python app.py

Extend app.py to do what you want to the events, like have a chat with other people or integrate into your bot framework.

Features

  • TODO

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

pyucwa's People

Contributors

tonybaloney avatar

Stargazers

Gabriel Reis avatar Arturo Avilés avatar Jithu R Jacob avatar Kristof Daja avatar Roshan Raj avatar David Cottrell avatar ~P avatar  avatar Prakasam Dhamodhiran avatar Kehao Chen avatar satheesh avatar Luke Milby avatar Daniel Arno George Koehler avatar Jon avatar Giacomo Lacava avatar Tejas Tank avatar  avatar

Watchers

Giacomo Lacava avatar James Cloos avatar  avatar Craig Hadix avatar  avatar  avatar

pyucwa's Issues

URLS in CONTRIBUTING.rst are wrong

They refer to /ucwa/ , clearly the old repository name.

(BTW, the old ucwa module in PyPI should be pulled if it's obsolete, it's full of these old urls.)

Missing module in requirements_dev.txt

In order to successfully start ucwa.http, you need the future module, which is missing in requirements_dev.txt. Because the PyPI package of that module seems broken (it failed to install on my OSX Python 2.7.11), I even had to get the upstream repository, so I suggest the actual line to add in requirements.txt for the time being should be:

-e git+https://github.com/PythonCharmers/python-future#egg=future

Autodiscovery must deal with "redirect"

For the domain I'm working with (infratects.com), the first autodiscovery request does not actually include the user resource, but rather a redirect one; only by going to that url you get an actual user dict.

Hence, the bulk of do_autodiscovery() in ucwa/actions.py should look something like this:

    discovery = r.json()
    path = None
    if discovery['_links'].get('user', False):
        path = discovery['_links']['user']['href']
    elif discovery['_links'].get('redirect', False):
        tmp_redir = requests.get(discovery['_links']['redirect']['href'])
        discovery_redir = tmp_redir.json()
        if discovery_redir['_links'].get('user', False):
            path = discovery_redir['_links']['user']['href']
        else:
            raise Exception("Could not make sense of these links: " + tmp_redir.content)
    domain = urlparse(path)
   ...

Update PyPI page with your github

Hi,

Took me some time to find the original repo of pyucwa since the page on PyPi is pointing to the wrong github url.

Would recommend you update :)

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.