Code Monkey home page Code Monkey logo

python-linkfire's Introduction

python-linkfire

Python linkfire.com API. To install it use pip command:

pip install -U python-linkfire

Basic Usage

In order to use the API, you must have a valid account on linkfire.com. Every API Object in this library will use the method authenticate() that will catch the API keys you need to perform every call to the linkfire server.

Every link must have these information:

  • The old URL
  • A title
  • A description

Once you have all these informations you can create a Link Object in this way:

from linkfire import Link

my_link = Link(
    url="http://who.is.lorenzo.setale.me/?",
    title="my website", 
    description="Description of a super cool website."
)

And then you have to autenticate the API object in this way:

my_link.authenticate(username, password)

Once you get authenticated, you can perform the main API call to make the link shorter:

my_link.make_it_shorter()

Once it will be ready you can use the Link object as normal string or use its property to get the shorter URL:

my_link.shortlink
print str(my_link)

python-linkfire's People

Contributors

koalalorenzo avatar

Watchers

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