GithubHelp home page GithubHelp logo

openpath's Introduction

OpenPath Implementation

Our first steps at connecting place-based learning. This is part of our development in rounds one and two of Mozilla Ignite. http://openpathme.tumblr.com/

Our WebRTC videochat code is located here: ://github.com/vanevery/openpath/blob/master/README.md

part of Mozilla Ignite (mozillaignite.org)

Our pitch is here:

https://mozillaignite.org/apps/438/

Thanks!

==================================================================================== OpenPath's data model is divided into users, sessions, and events. Look at the datamodel file to learn how it is structured. Be forewarned, this is a work in progress.

Both the User and Session service API's follow the standard "RESTful" setup and include the following methods (these will mostly be removed eventually)

There are 2 ways to save any type of data be it an item in the "users" or "sessions" collections:

Method 1: GET followed by PUT

  1. Get a user by calling:
url: http://openpath.me/users/<id>
  example: http://openpath.me/users/5171a61a1a719e4a04000010
verb: GET
body: none
  1. Modify the JSON object returned (or replace it completely if desired)

  2. Put the user by calling:

url: http://openpath.me/users/5171a61a1a719e4a04000010
verb: PUT
body: modified version of JSON object

Method 2: Change a single key value on a single object

  1. Call the following service:
url: http://openpath.me/update/<collection>/<id>/<key>/<value>
  example: http://openpath.me/update/users/5153c9daf12aa42757000007/name/boblablaw
verb: PUT
body: none

OTHER SERVICES

GET - http://baseurl.com/users

  • returns the full list of users

POST - http://baseurl.com/users

  • with some json in the request body, it saves as a new user

DELETE - http://baseurl.com/users/

  • deletes record of the given id

EMAIL - http://openpath.me/email

  • request type: POST
  • headers: Content-Type: application/json
  • body: {"to":"[email protected]","subject":"test subj","text":"test txt"}

Note, the "to" field can also contain "Jared [email protected], Ahmad [email protected]" so that would make the body: {"to":"Ahmad [email protected], Jared [email protected]","subject":"test subj","text":"test txt"}

We'll be making more specific service calls for our needs as we build out user profiles and event profiles.

**Some important things to note:

  1. When doing a PUT request, you must have the header: Content-Type: application/json (or else empty object will be saved)

  2. When doing a PUT request, do NOT include the _id part of the json (or else error will occur)

  3. Before you integrate either of these into your code, we recommend using this chrome extension to just play around with these services: https://chrome.google.com/webstore/detail/dev-http-client/aejoelaoggembcahagimdiliamlcdmfm IMPORTANT: you must be logged in as guest or persona login in a separate chrome tab for this to work - these are authenticated services!

  4. IMPORTANT: Since you don't want to have email passwords pushed to the github repo, create a config file to store email login/password one level up from the project root.
    Do a git pull, be sure to create a file called "config.js", and put it in the same location as the main openPath project folder. Here are its contents:

// begin config.js var config = {};

config.email = {}; config.email.user = "username"; config.email.password = "password"; config.email.host = "smtp.gmail.com";

module.exports = config; // end config.js

====================================================================================

openpath's People

Contributors

asaeed avatar jamiegilmartin avatar jaredlamenzo avatar richhauck avatar

Watchers

 avatar  avatar

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.