Giter VIP home page Giter VIP logo

printnode-java's Issues

Requests are sent to printer 2x (twice) - Solved

APIClient.java has a method called "createPrintJob" which passes PrintJobJson as a parameter. This file (PrintJobJson.java) has a varible qty = -1 which was sending the requests twice.
I changed it to 1 and now I'm getting only one copy.

Please Publish Maven Packages

Hi there and thank you for this SDK. We are integrating your API and noticed there are no packages for public use.

Would you be willing to publish packages for this library?

Thank you!

Printer's name is not parsed from the JSON response

The printer's name is not parsed on the JSON response. Attaching suggested change on Printer.java:

public Printer(final JsonObject response) {
        if (!response.get("id").isJsonNull()) {
            id = response.get("id").getAsInt();
        }
        if (!response.get("computer").isJsonNull()) {
            computer = new Computer(response.get("computer").getAsJsonObject());
        }
        if (!response.get("description").isJsonNull()) {
            description = response.get("description").getAsString();
        }
        if (!response.get("name").isJsonNull()) {
            name = response.get("name").getAsString();
        }
        if (!response.get("capabilities").isJsonNull()) {
            capabilities = new Capabilities(response.get("capabilities").getAsJsonObject());
        }
        if (!response.get("default").isJsonNull()) {
            defaults = response.get("default").getAsString();
        }
        if (!response.get("createTimestamp").isJsonNull()) {
            createTimestamp = response.get("createTimestamp").getAsString();
        }
        if (!response.get("state").isJsonNull()) {
            state = response.get("state").getAsString();
        }
        json = response.toString();
    }

fitToPage incorrect Gson mapping

in class com.printnode.api.Options there is a private Boolean fitToPage; which maps by default to "fitToPage" json field, not "fit_to_page" as PrintNode api expected

According to the Json docs i found that you need use annotation like:
@SerializedName("fit_to_page") instead plain field declaration

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.