NAV Navbar
shell swift java python
  • Introduction
  • Authentication
  • Methods
  • Errors
  • Introduction

    Welcome to the Rowan ACM API! You can use our API to access information about ACM.

    We have language bindings in Shell, Swift, Java, and Python! You can view code examples and switch the programming language with the tabs.

    This example API documentation page was created with Slate. Feel free to edit it and use it as a base for your own API's documentation.

    Authentication

    Most resources require an API key. We are using the Firebase Auth Tokens. You can find more information on the firebase documentation

    Methods

    Sign in to the meeting

        curl -X GET https://api.rowanacm.org/prod/sign-in?token=YOUR_TOKEN
    

    Returns JSON structured like this:

    {
      "message": "You signed in to the meeting",
      "status": "OK",
      "response_code": 200
    }
    

    You can only sign in while the meeting is in progress

    HTTP Request

    GET https://api.rowanacm.org/prod/sign-in

    Query Parameters

    Parameter Required Description
    token true Your Firebase auth token

    Choose/change your committee

        curl -X GET https://api.rowanacm.org/prod/set-committees?token=YOUR_TOKEN&committees=general,app
    

    Returns JSON structured like this:

    {
      "status": "OK",
      "message": "You signed up for committees [general, app]"
    }
    

    Don't like your committee? No problem

    The committee names are general, app, ai, web, robotics, and game.

    HTTP Request

    GET https://api.rowanacm.org/prod/set-committees

    URL Parameters

    Parameter Required Description
    token true Your firebase auth token
    committees true A comma separated list of committee names

    Get user info

        curl -X GET https://api.rowanacm.org/prod/get-user-info?token=YOUR_TOKEN
    

    Returns JSON structured like this:

    {
        "phone_number": null,
        "uid": "abc123",
        "member_since": "September 2016",
        "committee_string": "App Committee",
        "profile_picture": "https://avatars.slack-edge.com/mypicture.jpg",
        "is_admin": false,
        "github_username": "JohnSmith",
        "committee_list": [
            "app"
        ],
        "name": "John Smith",
        "slack_username": "johnsmith",
        "on_slack": true,
        "is_eboard": false,
        "todo_list": [
            {
                "text": "Attend your first meeting",
                "completed": true
            },
            {
                "text": "Sign in to the meeting",
                "completed": true
            },
            {
                "text": "Sign up for Slack",
                "completed": true
            },
            {
                "text": "Choose a committee",
                "completed": true
            },
            {
                "text": "Join our Github organization",
                "completed": true
            }
        ],
        "meeting_count": 10,
        "on_github": true,
        "rowan_email": "smithj0@students.rowan.edu"
    }
    

    HTTP Request

    GET https://rowanacm.org/prod/get-user-info

    URL Parameters

    Parameter Required Description
    token true Your firebase login token

    Get announcements

        curl -X GET https://api.rowanacm.org/prod/get-announcements
    
        import http.client
    
        conn = http.client.HTTPConnection("api.rowanacm.org")
        conn.request("GET", "/prod/get-announcements")
    
        res = conn.getresponse()
        data = res.read()
    
        print(data.decode("utf-8"))
    

    Returns JSON structured like this:

    [
        {
            "snippet": "Considering that it's July, I'd doubt you thought that was was a meeting today. But if you weren't sure, there's not.",
            "timestamp": 1500647954,
            "committee_id": "general",
            "committee": "General",
            "author": "Tyler",
            "url": null,
            "text": "Considering that it's July, I'd doubt you thought that was was a meeting today. But if you weren't sure, there's not.",
            "title": "No meeting today",
            "icon": "https://firebasestorage.googleapis.com/myimage.png"
        },
        {
            "snippet": "We just passed 100 followers on Twitter! Unfortunately that's in base 2. Help us get up to 1000 by following us @RowanACM",
            "timestamp": 1487393994,
            "committee_id": "general",
            "committee": "General",
            "author": null,
            "url": "https://twitter.com/rowanacm",
            "text": "We just passed 100 followers on Twitter! Unfortunately that's in base 2. Help us get up to 1000 by following us @RowanACM",
            "title": "Follow @RowanACM on Twitter!",
            "icon": "https://firebasestorage.googleapis.com/myimage.png"
        }
    ]
    

    Get a list of ACM announcements sorted in chronological order

    HTTP Request

    GET https://api.rowanacm.org/prod/get-announcements

    Query Parameters

    Parameter Required Description
    limit false Limit the number of responses (Coming Soon)
    filter false Filter announcements based on committee (Coming Soon)

    Post announcements

        curl -X GET https://api.rowanacm.org/prod/post-announcement?token=YOUR_TOKEN&title=Hello&body=World
    

    Returns JSON structured like this:

    {
      "status": "OK",
      "message": "Announcement posted"
    }
    

    You must be an admin to post an announcement

    HTTP Request

    GET https://api.rowanacm.org/prod/post-announcement

    Query Parameters

    Parameter Required Description
    token true Firebase auth token
    title true Title of the announcement
    body true Announcement text
    committee false Default: General
    also_post_on_slack false Default: False

    Errors

    The API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is bad.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- The resource requested is hidden for administrators only.
    404 Not Found -- The specified resource could not be found.
    405 Method Not Allowed -- You tried to access a resource with an invalid method.
    406 Not Acceptable -- You requested a format that isn't json.
    410 Gone -- The resource requested has been removed from our servers.
    418 I'm a teapot.
    429 Too Many Requests -- You're sending to many requests! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.