File tree Expand file tree Collapse file tree 2 files changed +6
-18
lines changed
Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change 11const js = `const https = require('https')
22
3- const use_cursor = true;
4- const perPage = 50;
53const options = {
64 hostname: 'api.paystack.co',
75 port: 443,
8- path: ` / transaction ?use_cursor = $ { use_cursor } & perPage = $ { perPage } `,
6+ path: ` / transaction ?use_cursor = true & perPage = 50 `,
97 method: 'GET',
108 headers: {
119 Authorization: 'Bearer YOUR_SECRET_KEY'
@@ -27,12 +25,10 @@ https.request(options, res => {
2725})`
2826
2927const php = `<?php
30- $use_cursor = true;
31- $perPage = 50;
3228 $curl = curl_init();
3329
3430 curl_setopt_array($curl, array(
35- CURLOPT_URL => "https://api.paystack.co/transaction?use_cursor=$use_cursor &perPage=$perPage ",
31+ CURLOPT_URL => "https://api.paystack.co/transaction?use_cursor=true &perPage=50 ",
3632 CURLOPT_RETURNTRANSFER => true,
3733 CURLOPT_ENCODING => "",
3834 CURLOPT_MAXREDIRS => 10,
@@ -58,9 +54,7 @@ const php = `<?php
5854?>`
5955
6056const sh = `#!/bin/sh
61- use_cursor="true"
62- perPage="50"
63- url="https://api.paystack.co/transaction?use_cursor=$use_cursor&perPage=$perPage"
57+ url="https://api.paystack.co/transaction?use_cursor=true&perPage=50"
6458authorization="Authorization: Bearer YOUR_SECRET_KEY"
6559
6660curl "$url" -H "$authorization" -X GET`
Original file line number Diff line number Diff line change 11const js = `const https = require('https')
22
3- const page = 1;
4- const perPage = 50;
53const options = {
64 hostname: 'api.paystack.co',
75 port: 443,
8- path: ` / transaction ?page = $ { page } & perPage = $ { perPage } `,
6+ path: ` / transaction ?page = 1 & perPage = 50 `,
97 method: 'GET',
108 headers: {
119 Authorization: 'Bearer SECRET_KEY'
@@ -27,12 +25,10 @@ https.request(options, res => {
2725})`
2826
2927const php = `<?php
30- $page = 1;
31- $perPage = 50;
3228 $curl = curl_init();
3329
3430 curl_setopt_array($curl, array(
35- CURLOPT_URL => "https://api.paystack.co/transaction?page=$page &perPage=$perPage ",
31+ CURLOPT_URL => "https://api.paystack.co/transaction?page=1 &perPage=50 ",
3632 CURLOPT_RETURNTRANSFER => true,
3733 CURLOPT_ENCODING => "",
3834 CURLOPT_MAXREDIRS => 10,
@@ -58,9 +54,7 @@ const php = `<?php
5854?>`
5955
6056const sh = `#!/bin/sh
61- page="1"
62- perPage="50"
63- url="https://api.paystack.co/transaction?page=$page&perPage=$perPage"
57+ url="https://api.paystack.co/transaction?page=1&perPage=50"
6458authorization="Authorization: Bearer YOUR_SECRET_KEY"
6559
6660curl "$url" -H "$authorization" -X GET`
You can’t perform that action at this time.
0 commit comments