Skip to content

beauty-enjoy/dbmeinv-firebase-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

dbmeinv-firebase-api

dbmeinv-firebase-api Provides a wealth of beautiful pictures (about 90K ) stored in the firebase real time database

Introduction

I crawl data every day from dbmeinv.com and store in firebase .
this repo is to show you how to get beauty data from my firebase database . If you can't wait to see the beauty , Click on here to see the effect !!

API

you could read more examples directly

Direct access to JSON

restful : https://beauty-ad056.firebaseio.com/dbmn/data/posts/-KcqIEF8cof93PBuQZ0m.json?print=pretty

{
  "authorname" : "泽尻笼儿",
  "avatar" : "https://img3.doubanio.com/icon/up96969241-20.jpg",
  "cid" : 6,
  "content" : "我不管我最可爱,我不管,我是小公主,要举高高要抱抱",
  "date" : 1481595825000,
  "id" : "1060224",
  "imageUrl" : "http://ww4.sinaimg.cn/bmiddle/0060lm7Tgw1fawbhcv5nwj30dw0iijtg.jpg",
  "images" : [ "http://ww4.sinaimg.cn/large/0060lm7Tgw1fawbhcv5nwj30dw0iijtg.jpg", "http://ww2.sinaimg.cn/large/0060lm7Tgw1fawbhcjxpwj30dw0iidhx.jpg", "http://ww3.sinaimg.cn/large/0060lm7Tgw1fawbhc86hwj30dw0iitaw.jpg", "http://ww3.sinaimg.cn/large/0060lm7Tgw1fawbhbwb2ij30dw0iiac5.jpg", "http://ww2.sinaimg.cn/large/0060lm7Tgw1fawbhb3y1yj30dw0iimz8.jpg", "http://ww2.sinaimg.cn/large/0060lm7Tgw1fawbhani8lj30dw0iiq50.jpg", "http://ww1.sinaimg.cn/large/0060lm7Tgw1fawbha5r7ej30dw0iiwgj.jpg", "http://ww1.sinaimg.cn/large/0060lm7Tgw1fawbh9ql1pj30dw0iidi1.jpg", "http://ww4.sinaimg.cn/large/0060lm7Tgw1fawbh99jcvj30dw0iitav.jpg", "http://ww2.sinaimg.cn/large/0060lm7Tgw1fawbh8w7gaj30dw0iigo3.jpg", "http://ww4.sinaimg.cn/large/0060lm7Tgw1fawbh8k5m3j30dw0iiju7.jpg" ],
  "location" : "常居: 北京",
  "title" : "【晒】喜欢的请夸我,不喜欢的请抠眼珠子哈哈哈哈"
}

Use Firebase sdk

js web sdk examples

  
 <body>
    <script src="https://www.gstatic.com/firebasejs/3.4.0/firebase.js"></script>
    <script>
    firebase.initializeApp({ // init firebase App
        databaseURL: 'https://beauty-ad056.firebaseio.com',
    });             
    var dataRef = firebase.database().ref('dbmn/data')
    var cid = 'cid2'
    dataRef.child(cid) // cid* look at https://github.com/beauty-enjoy/dbmeinv-firebase-api#get-keys           
    .orderByKey()
    .limitToLast(2)
    .once('value')
    .then(function(snap){ return Object.keys(snap.val())}) // 2. get newest boob'posts keys
    .then(function(keys){               
        return Promise.all(keys.map(function(key){ // 3. get posts by keys                    
            return dataRef.child('posts').orderByKey().equalTo(key).once('child_added')
            .then(function(snap){ return snap.val() })
        }))
    })
    .then(function(result){
        // all result here
        console.log('all the posts which cid is : [%s] \n',cid,result)
    })
    
    </script>
 </body>

client document Android, iOSweb, and Servers

Keys means

cid mean
cid2 breast
cid3 leg
cid4 face
cid5 others
cid6 buttocks
cid7 stockings

Related Projects

we will add a Related Projects for your repo which useing dbmeinv-firebase-api

Core Team


Netpi Chen

beauty spider


Founder for this repo

Releases

No releases published

Packages

No packages published