Giter VIP home page Giter VIP logo

scoopit-java's People

Contributors

vdemay avatar zenria avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mlew980

scoopit-java's Issues

Some more informations in a function

Hello,

I just discovered your app, and I find it wonderful. This job will help me a lot.
I just have on question. In your sample code every posts from the topic are returned. For my work i would like to add the plain text of the post and the normal image url. How could I add those informations ? If I have all those informations it would be so great for me.

Thanks in advance,

Regards

Matthieu526

PS : and what about a list of tags for each post ?

Edit 29-01-14 : i found what I wanted, and understood a little better how your work workes.

Best way to retrieve all posts from a topic

Hello,

What is the best way to retrieve every posts from a topic ? When a topic is asked the number of posts is returned, but how many are there by page ? Is'nt it possible to know how many pages there are ? So I don't know what is the best method.

Thanks in advance for your answers,

Matthieu526

Don't having any error while resolving

Hello,

I wrote a function to use api's resolve function. I use it to resolve topics. But some times topics doesn't exist and I would like that my app don't crash. This works perfectly for topics who exists.
I wrote the function using exactly your model :

public Long getIdFromShortName(String shortName) throws ScoopApiExecutionException {
    return getIdFromShortName(shortName, null);
}

public Long getIdFromShortName(String shortName, String type) throws ScoopApiExecutionException {
        Multimap<String, String> params = LinkedListMultimap.create();
        if (type != null) {
            params.put("type", type.toString());
        } else {
            params.put("type", "Topic");
        }
        params.put("shortName", shortName);
        JsonNode root = doGet(RESOLVER_ENDPOINT, params);
    if (root == null) {
        return null;
    }

            Resolver model;
            try {
        model = mapper.readValue(root, Resolver.class);
    } catch (JsonParseException e) {
        e.printStackTrace();
        return null;
    } catch (JsonMappingException e) {
        e.printStackTrace();
        return null;
    } catch (IOException e) {
        e.printStackTrace();
        return null;
    }
    return model.id;
}

What should I add to return for exemple "0" if the topic doesn't exists ?

Thanks in advance,

Matthieu526

Error when changing topic ID

Hello,

When I use your program, and try to change the ID of the topic to retrieve, the program crashes.But I can't understand why... The error is a "NullPointerExeption" at line :
for (Post p : t.curatedPosts).

And at the end it sends back to this line :
mapper.readValue(root.get("topic"), Topic.class).

I don't know what to do to resolve this error.

Regards,

Matthieu526

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.