This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Get token from edit profile API & Mobile https://developer.teamwork.com/projects/apikey/key | |
# Get auth string by base64 encoding <token>:<randomstring> | |
# https://www.base64encode.org/ can be used to create such encoded string | |
token=<authstring> | |
authString="Authorization: Basic $token" | |
# Get user id from your profile url (/#/people/<userid>/tasks) | |
userId=<userid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use WP_CLI; | |
/** | |
* Paginated Query that performs callback for each iteration. | |
* | |
* @param string $callback Name of the callback function. | |
* @param array $args WP_Query arguments. | |
* @param string $message Message passed to WP CLI make_progress_bar. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |