Coder Social home page Coder Social logo

lofter-img's Introduction

网易LOFTER图片链接获取

[TOC]

简介

Lofter上有很多美图,特意做了这个,功能就是从LOFTER上获取图片地址,以json的形式输出。

文档

Docs

Demo

Demo

API参数

  • name

    • LOFTER名称,Required 必填参数
    • 如地址为 http://9mouth.lofter.com,则name参数填入9mouth即可
  • mode

    • 输出json模式,可选
    • 可选项:
    • simple (默认) 仅输出图片Url数组
    • full 输出文章标题、链接和图片Url数组
  • pagesize

    • 分页大小,可选
    • 默认pagesize=10,最大可为50
  • page

    • 当前页码,Required 必填参数
    • 默认page=1
  • refresh

    • 是否刷新缓存,可选
    • 当值为 true 时,将刷新缓存,否则不刷新缓存
  • callback

    • 发起jsonp请求时可以使用此参数

返回值

simple mode

[
 "http://demo.jpg",
 "http://demo2.jpg",
 "http://demo3.jpg"
]

full mode

[
    {
        "title":"图片",
        "date":"2017-02-13 22:13:32",
        "link":"http://9mouth.lofter.com/post/11c344_e350819",
        "list":[
            "http://imglf1.nosdn.127.net/img/bzdNQ3lVZUc4R1QzdWJ4c3BUTGpuUjk4OGRMZTZUcitqZEhEbi9mTDJpbWNGYTMvM0hMT3VRPT0.jpg"
        ]
    }
]
参数名 类型 说明
title string LOFTER文章标题
date string 文章发布时间
link string 文章链接
list array 文章中的图片Url列表

缓存配置

缓存默认开启(文件)

缓存文件夹为cache文件夹,需保证可写。

默认缓存时间为1800秒,即30分钟


报错

Github Issues

lofter-img's People

Contributors

ionepub avatar

Stargazers

 avatar

Watchers

 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.