Skip to content

Instantly share code, notes, and snippets.

View poting-lin's full-sized avatar

Po-Ting poting-lin

View GitHub Profile
@tmxdyf
tmxdyf / api.md
Created September 22, 2016 06:03 — forked from jerrylau91/api.md
12306 API

12306数据接口API(草稿)

简化12306接口,规范属性名称,用于数据库设计,数据接口定义

数据定义

命名规则

@guruguruman
guruguruman / onesignal.php
Created September 6, 2016 14:03
Managing to send push notification using OneSignal https://onesignal.com/
<?php namespace App\Services;
use GuzzleHttp\Client;
class OneSignal {
const API_URL_ADD_PLAYER = 'https://onesignal.com/api/v1/players';
const API_URL_CREATE_PUSH = 'https://onesignal.com/api/v1/notifications';
const DEVICE_TYPE_IOS = 0;
const DEVICE_TYPE_ANDROID = 1;
@danielpataki
danielpataki / cached-posts.php
Last active July 24, 2019 10:57
WordPress REST API
public function get_remote_posts() {
$posts = get_transient( 'remote_posts' );
if( empty( $posts ) ) {
$response = wp_remote_get( 'http://mysite.com/wp-json/wp/v2/posts/' );
if( is_wp_error( $response ) ) {
return array();
}
$posts = json_decode( wp_remote_retrieve_body( $response ) );
@gildotdev
gildotdev / template.php
Created December 18, 2013 03:10
Drupal 7 hook method to remove cache busting query strings on css and js files. Related to this post https://drupal.org/node/242875
<?php
/**
* Implements hook_process_html
*/
function templatenamespace_process_html(&$vars) {
$search = array('scripts' => 'src=', 'styles' => 'href=', 'styles' => '@import\surl\(');
foreach ( $search as $var => $word ) {
if ( !empty($vars[$var]) ) {
@d3m3vilurr
d3m3vilurr / feedly_api.md
Last active March 30, 2024 08:21
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api