Skip to content

otobrglez/socol

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
pkg
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

socol

Social metrics collector written in Go.

Build Status Go Report Card ImageLayers Docker Pulls Docker Stars

Install

go get github.com/otobrglez/socol

Usage

Collect stats for one URL.

socol -url https://golang.org/

Collect stats for multiple URLs and selected platforms.

socol -url https://golang.org/,http://www.scala-lang.org/ -platform facebook,linkedin

Running as server

Start it on port 6000.

socol -s -p 6000

# Try it,...
curl "http://127.0.0.1:6000/stats?url=https://golang.org/"

This app is ready to be used with Heroku or Docker (instructions).

Deploy

Platforms

socol supported collection of following metrics: Buffer, Facebook, Google Plus, LinkedIn, Pinterest, Pocket, Reddit, StumbleUpon, Tumblr.

Why is Twitter not supported? Twitter has decided to remove stats from their public interfaces. You can read more about why on their blog.

Docker

Running socol server via Docker.

docker run -ti -p 5000:5000 otobrglez/socol

curl -s <docker_host>:5000/stats\?url=http://www.facebook.com | python -mjson.tool

Response from service.

{
    "facebook": {
        "click_count": 0,
        "comment_count": 7837699.0,
        "commentsbox_count": 5177,
        "completed_in": 0.28217279100000003,
        "count": 57893662.0,
        "fetched_in": 0.282076959,
        "like_count": 20070293.0,
        "share_count": 29985670.0,
        "total_count": 57893662.0
    },
    "google_plus": {
        "completed_in": 0.31490062700000004,
        "count": 338527,
        "fetched_in": 0.269049992
    },
    "linkedin": {
        "completed_in": 0.78390614,
        "count": 4479,
        "fetched_in": 0.783683243
    },
    "meta": {
        "total": 58320895
    },
    "origin": {
        "Locale": "sl_SI",
        "SiteName": "Facebook",
        "URL": "https://www.facebook.com/",
        "completed_in": 0.343662642,
        "fetched_in": 0.33344814500000003
    },
    "pinterest": {
        "completed_in": 0.143030286,
        "count": 60256,
        "fetched_in": 0.142972456
    },
    "stumbleupon": {
        "completed_in": 0.435604561,
        "count": 23971,
        "fetched_in": 0.435491601
    }
}

Author

License

Use it under MIT.

About

Social metrics collector written in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published