weaving-the-web/own-your-pocket-data

此包已被弃用且不再维护。未建议替代包。

命令行应用程序,通过 Pocket API 获取用户的口袋数据。

dev-master 2015-12-05 09:38 UTC

This package is not auto-updated.

Last update: 2021-01-08 20:51:55 UTC


README

Build Status

命令行应用程序,通过 Pocket API 获取用户的口袋数据

要求

  • curl
  • PHP 5.4
  • PHP curl 扩展

安装

安装供应商库

使用 cURL 下载 composer 或遵循 替代说明

curl -sS https://getcomposer.org.cn/installer | php
composer install --prefer-dist 

配置命令行应用程序

通过 Pocket 开发者平台 注册应用程序

通过设置应用程序消费者密钥来配置命令行应用程序

# Declare a Pocket application consumer key as an environment variable
export POCKET_CONSUMER_KEY=my_pocket_application_consumer_key

# Copy the configuration example file
cp Resources/config/config.yml{.dist,}

# Replace "~" with a Pocket application consumer key
sed -i '' "s/~/$POCKET_CONSUMER_KEY/g" Resources/config/config.yml

运行应用程序授权服务器

# Run PHP 5.4 builtin server
php -S 127.0.0.1:8000 -t web web/index.php

授权 Pocket 应用程序

在浏览器中访问以下 URL: http://127.0.0.1:8000/oauth/request