Coder Social home page Coder Social logo

ryck / personal-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tlongren/personal-api

0.0 2.0 0.0 288 KB

Personal API project for websites to display domain.com/api to show information about the site owner.

Home Page: http://www.longren.org/host-a-personal-api-on-heroku/

License: MIT License

personal-api's Introduction

personal-api

What It Does

Provides a simple JSON API for your personal site. Easily hosted on Heroku. Can provide any info you want, like age, employer, name, children, spoken languages, programming languages, skills, hobbies, or pretty much anything.

Idea

I saw Joshua Beckman's peronal API and wanted to provide one that anyone can easily install, ideally somewhere like Heroku.

Setup

This runs really nicely on herou, so I suggest running it there. To run anywhere else, just upload index.php and that's it. To setup Heroku, see this list.

  1. Fork tlongren/personal-api on GitHub and make a local clone.
  2. Install the Heroku Toolbelt and login to Heroku with the command heroku login. Enter your username and password to login with the Heroku Toolbelt.
  3. Create a new app on Heroku either through the web interface, or with the command ```heroku create````. If you do it with the command line the app name will be shown to you,
  4. Open a terminal and go into the folder that you cloned your fork into and run the command heroku git:remote -a heroku-app-name. That will add a remote named "heroku" to your local clone.
  5. Now, while still in your local clone folder, run git push heroku master to push your app to Heroku. If your app is named "heroku-app-name", you can access your app at http://heroku-app-name.herokuapp.com.

Examples

See http://api.longren.org/ or http://http://www.bckmn.com/api for examples.

PHP Example

For PHP devs, there's some basic querying examples in php-examples.php. Below is the output of php-example.php. It won't run on heroku (unsure why, any ideas?), so if you want to see a quick test, upload it to a PHP webserver you control.

30
Array
(
    [0] => Javascript
    [1] => HTML
    [2] => CSS
    [3] => PHP
)
stdClass Object
(
    [wife] => Kayla
    [daughter] => Sydney
)

Other Language Example

I'll be adding examples for JavaScript and maybe other languages as well. If you really want to see examples for a language, open an issue. I just ask that you name your example files like so: ruby-example.rb for Ruby or python-example.rb for Python.

A Screenshot

api.longren.org output

personal-api's People

Contributors

tlongren avatar

Watchers

Ricardo Gonzalez avatar James Cloos 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.