Coder Social home page Coder Social logo

Comments (3)

TheNightmanCodeth avatar TheNightmanCodeth commented on July 19, 2024 1

I'm accessing the preview property like so:
post.data["preview"]["images"][0]["source"]["url"]
just swap out the 0 for the resolution you want. 0 is full resolution, up to (i think) 4 which is the smallest size. However, the preview property is sometimes not available. Some subreddits can choose to have the feature disabled by default so if you're using an unauthorized client, or your user doesn't have a certain setting enabled on their profile an exception will be thrown.

from draw.

bkonyi avatar bkonyi commented on July 19, 2024

Thanks for the suggestion @Heasummn! I'll take a look and get that added for you.

In the meantime, I'm fairly certain you should be able to pull this value out of the data property for the submission (although I'm not certain which key it would be under).

from draw.

bkonyi avatar bkonyi commented on July 19, 2024

Sorry for the delay on this. I've published version 0.4.0 which includes a preview property in Submission. It looks like the Dart 2.0 release broke a couple of dependencies that haven't updated their SDK constraints, so it looks like dartdoc won't generate the documentation. Take a look here for the signature.

from draw.

Related Issues (20)

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.