0.1.0 • Published 8 years ago

dumpert.js v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

Dumpert.js

Unofficial API wrapper in javascript using the mobile Dumpert API.

Documentation

Functions

getTrendingItems()

These items are from the slider at the frontpage of the Dumpert app. Returns an array of item objects.

dumpert.getTrendingItems(function(error, items) {
    if(!error){
        console.log("\nCurrent popular items on dumpert: ");
        items.forEach(function(el, i) {
            console.log("[" + (i + 1) + "]" + el.title + " - " + el.description);
        });
    }
});

getLatestItems()

Gets the latest uploaded items. Returns an array of item objects.

dumpert.getLatestItems(0, function(error, items) {
    console.log("\nLatest items on dumpert: ");
    items.forEach(function(el, i) {
        console.log("[" + (i + 1) + "]" + el.title + " - " + el.description);
    });
});

getLatestVideos()

Gets the latest uploaded videos. Returns an array of item objects.

dumpert.getLatestVideos(0, function(error, items) {
    console.log("\nLatest videos on dumpert: ");
    items.forEach(function(el, i) {
        console.log("[" + (i + 1) + "]" + el.title + " - " + el.description);
    });
});

getLatestPhotos()

Gets the latest uploaded photos. Returns an array of item objects.

dumpert.getLatestPhotos(0, function(error, items) {
    console.log("\nLatest items on dumpert: ");
    items.forEach(function(el, i) {
        console.log("[" + (i + 1) + "]" + el.title + " - " + el.description);
    });
});

setUserAgent()

Changes the UserAgent for the requests, this is by default an iPhone running iOS 8 with the app version 2.1.1 Dumpert/2.1.1 (iPhone; iOS 8.3; Scale/2.00)

dumpert.setUserAgent("Dumpert/2.1.1 (iPhone; iOS 9.3; Scale/2.00)");

createDumpertURL()

Creates an url to dumpert.nl with the ID.

dumpert.createDumpertURL("6742471_f9f5b02b");

Objects

Item

  • id: Identifier of the video
  • date: Publish date in format 2016-03-24T13:51:02+01:00
  • title: Title of the vid
  • description: Description of the video
  • media: See Media Objects
  • nsfw: boolean on whether the content is NSFW
  • stats: Object with stats of the media
    • kudos_today: The amount of kudos from today
    • kudos_total: The amount of kudos from every day
    • views_today: The amount of views from today
    • views_total: The amount of views from every day
  • still: Thumbnail
  • thumbnail Slightly different thumbnail..
  • tags: Tags split by a space

Media

  • duration: Duration of the video in seconds
  • mediatype: VIDEO for video, FOTO for image
  • variants: Array of variants of the media

Official stuff

I do not recommend using this API for production purposes. I created this purely for educational purposes. Using the API is probably against the EULA. Software provided "AS IS", use it at your own risk.

If you're tmg, a geenstijl employee or joris, and you are really pissed because I am reverse engineering your app and creating this, mail me at gezeur@nickforall.nl.