GithubHelp home page GithubHelp logo

jodelapi's Introduction

JodelAPI

forthebadge forthebadge forthebadge

Big thanks to KirschbaumP

Build status Github All Releases Status Test status

Introduction

This is the carefully reverse-engineered .NET Jodel API in C#. Please feel free to grab the source or compiled library from the link provided below.

This is a Swiss software product and therefore might be awesome!

PLEASE NOTE:

As of October 29th 2016 the API is completely non-static and should be easier to use than ever before.

Binaries and pre-requisites

Getting Started

Initial Setup

In order to set your location and start interacting with the various methods of the API you must first set up a few objects. Namely, you will need a new User object, the Account class as well as a Jodel object. You will also need to generate your own arsenal of access tokens by using the Account.GenerateAccessToken() method. (This generates up to 60 access tokens per IP, please be careful to not get yourself banned!)

using JodelAPI; // add namespace
// ...

User user = new User(string.Empty, MyLoc.Latitude, MyLoc.Longitude, MyLoc.CountryCode, MyLoc.City);

Tokens myAccessToken = Account.GenerateAccessToken(user);
user.AccessToken = myAccessToken;

Jodel jodel = new Jodel(user);
jodel.Account.SetUserLocation(myAccessToken);

Jodel

The class 'Jodel' contains all functions for getting, deleting, posting, etc Jodels.

Getting the Jodels

To get the Jodels call

GetAllJodels()

Returns:

List<Jodels>

Properties:

public string PostId { get; set; }
public string Message { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public int PinCount { get; set; }
public string HexColor { get; set; }
public bool IsNotificationEnabled { get; set; }
public string PostOwn { get; set; }
public int Distance { get; set; }
public int ChildCount { get; set; }
public bool IsImage { get; set; }
public int VoteCount { get; set; }
public int CommentsCount { get; set; }
public string LocationName { get; set; }
public string UserHandle { get; set; }
public string ImageUrl { get; set; }

Upvoting & Downvoting

To down-/upvote a Jodel use UpvoteJodel(string postId) or DownvoteJodel(string postId). It takes the post id of the Jodel.

Posting

To post a Jodel with a message use PostJodel(string message, PostColor colorParam = PostColor.Random, string postId = null).

To post an image use PostJodel(Image image, PostColor colorParam = PostColor.Random, string postId = null)

Please note that posting images is still in the works!

Arguments:

  • message, image: the post content.
  • colorParam: PostColor enum which sets the post color.
  • postId: the original Jodel post id (optional)

PostColor is defined as follows:

public enum PostColor
{
    Orange,
    Yellow,
    Red,
    Blue,
    Bluegreyish,
    Green,
    Random
}

Getting comments

To get the comments from an Jodel you can use GetComments(string postId).

Arguments:

  • postId: the Jodel postId

Returns:

List<Comments>

Properties:

public string PostId { get; set; }
public string Message { get; set; }
public string UserHandle { get; set; }
public int VoteCount { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public bool IsImage { get; set; }
public string ImageUrl { get; set; }

My Jodels, Comments and Votes

To be completed ...

jodelapi's People

Contributors

gitbook-bot avatar ioncodes avatar kirschbaump 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.