-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gominima/final-fixes
Fixed a lot of stuff
- Loading branch information
Showing
9 changed files
with
349 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Shubhaankar-Sharma |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]: Go-requests unexpected behaviour" | ||
labels: "\U0001F41Bbug" | ||
assignees: megatank58, apoorvcodes, Shubhaankar-Sharma | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '38 12 * * 2' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"workbench.colorCustomizations": { | ||
"activityBar.background": "#53143F", | ||
"titleBar.activeBackground": "#741C58", | ||
"titleBar.activeForeground": "#FEFCFD" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,92 @@ | ||
# go-requests | ||
<p align="center"> | ||
<a href="https://gominima.studio"> | ||
<img alt="go-requests" src="./assets/logo.png" /> | ||
</a> | ||
</p> | ||
|
||
[![GoDoc](https://godoc.org/github.com/Shubhaankar-sharma/go-requests?status.svg)](https://godoc.org/github.com/Shubhaankar-sharma/go-requests) | ||
<p align="center"> | ||
<a href="https://goreportcard.com/badge/github.com/gominima/go-requests"> <img src="https://goreportcard.com/badge/github.com/gominima/go-requests" /> </a> | ||
<a href="https://img.shields.io/github/go-mod/go-version/gominima/go-requests"> <img src="https://img.shields.io/github/go-mod/go-version/gominima/go-requests" /></a> | ||
<a href="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"> <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" /></a> | ||
<a href="https://discord.gg/gRyCr5APmg"> <img src="https://img.shields.io/discord/916969864512548904" /></a> | ||
<img src="https://img.shields.io/tokei/lines/github/gominima/go-requests" /> | ||
<img src="https://img.shields.io/github/languages/code-size/gominima/go-requests" /> | ||
</p> | ||
|
||
## 🦄 Example | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gominima/go-requests" | ||
) | ||
|
||
func main() { | ||
client := requests.NewRequest("https://random-data-api.com/api/users/random_user", make(map[string]interface{}), make(map[string]string)) | ||
res, err := client.Get() | ||
if err != nil { | ||
panic(err) | ||
} | ||
fmt.Println(res.Body) | ||
//response would be something like this | ||
/* | ||
{ | ||
"id": 5105, | ||
"uid": "58718d5d-456f-45ac-ac0a-fbda86892afd", | ||
"password": "RyhWmkV0TH", | ||
"first_name": "Bart", | ||
"last_name": "Brekke", | ||
"username": "bart.brekke", | ||
"email": "[email protected]", | ||
"avatar": "https://robohash.org/quaeratipsumiste.png?size=300x300&set=set1", | ||
"gender": "Non-binary", | ||
"phone_number": "+1-268 1-580-929-3581", | ||
"social_insurance_number": "355857970", | ||
"date_of_birth": "1982-09-08", | ||
"employment": { | ||
"title": "Community-Services Planner", | ||
"key_skill": "Organisation" | ||
}, | ||
"address": { | ||
"city": "Hyattside", | ||
"street_name": "Erdman Loop", | ||
"street_address": "93982 Frederick Lake", | ||
"zip_code": "86334", | ||
"state": "West Virginia", | ||
"country": "United States", | ||
"coordinates": { | ||
"lat": -82.88119017206014, | ||
"lng": 150.2430514904285 | ||
} | ||
}, | ||
"credit_card": { | ||
"cc_number": "4198-3576-9309-1264" | ||
}, | ||
"subscription": { | ||
"plan": "Bronze", | ||
"status": "Idle", | ||
"payment_method": "Bitcoins", | ||
"term": "Monthly" | ||
} | ||
} | ||
**/ | ||
} | ||
|
||
|
||
``` | ||
|
||
## ❓Why Go-requests | ||
|
||
Go requests is made for making data fetch wat easier and fun to use, it uses all standard go packages without any other dependency, also is pretty fast and reliable . | ||
|
||
<br/> | ||
|
||
## ⭐ Contributing | ||
|
||
**If you wanna help grow this project or say a thank you!** | ||
|
||
1. Give minima a [GitHub star](https://github.com/gominima/go-requests/stargazers) | ||
2. Fork requests and Contribute | ||
4. Join our [Discord](https://discord.gg/gRyCr5APmg) community |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gominima/go-requests" | ||
) | ||
|
||
func main() { | ||
client := requests.NewRequest("https://random-data-api.com/api/users/random_user", make(map[string]interface{}), make(map[string]string)) | ||
res, err := client.Get() | ||
if err != nil { | ||
panic(err) | ||
} | ||
fmt.Println(res.Body) | ||
//response would be something like this | ||
/* | ||
{ | ||
"id": 5105, | ||
"uid": "58718d5d-456f-45ac-ac0a-fbda86892afd", | ||
"password": "RyhWmkV0TH", | ||
"first_name": "Bart", | ||
"last_name": "Brekke", | ||
"username": "bart.brekke", | ||
"email": "[email protected]", | ||
"avatar": "https://robohash.org/quaeratipsumiste.png?size=300x300&set=set1", | ||
"gender": "Non-binary", | ||
"phone_number": "+1-268 1-580-929-3581", | ||
"social_insurance_number": "355857970", | ||
"date_of_birth": "1982-09-08", | ||
"employment": { | ||
"title": "Community-Services Planner", | ||
"key_skill": "Organisation" | ||
}, | ||
"address": { | ||
"city": "Hyattside", | ||
"street_name": "Erdman Loop", | ||
"street_address": "93982 Frederick Lake", | ||
"zip_code": "86334", | ||
"state": "West Virginia", | ||
"country": "United States", | ||
"coordinates": { | ||
"lat": -82.88119017206014, | ||
"lng": 150.2430514904285 | ||
} | ||
}, | ||
"credit_card": { | ||
"cc_number": "4198-3576-9309-1264" | ||
}, | ||
"subscription": { | ||
"plan": "Bronze", | ||
"status": "Idle", | ||
"payment_method": "Bitcoins", | ||
"term": "Monthly" | ||
} | ||
} | ||
**/ | ||
} |
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/Shubhaankar-sharma/go-requests | ||
module github.com/gominima/go-requests | ||
|
||
go 1.15 | ||
go 1.17 |