Skip to content

Commit

Permalink
chore: removing references from v3 (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 authored Oct 4, 2024
1 parent b19ecdb commit cc2a68a
Show file tree
Hide file tree
Showing 2,196 changed files with 8 additions and 80,520 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Change Log
All notable changes to this project will be documented in this file.

[2024-10-04] Version 4.0.0-rc.1
---------------------------
Release Candidate Preparation

[2024-08-26] Version 3.16.0
---------------------------
**Library - Chore**
Expand Down
43 changes: 0 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,49 +89,6 @@ source ./sendgrid.env

The following is the minimum needed code to send an email with the [/mail/send Helper](helpers/mail) ([here](examples/helpers/mail/example.go#L32) is a full example):

### Using Autogenerated Code
```go
package main

import (
"encoding/json"
"fmt"
"github.com/sendgrid/sendgrid-go"
MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail"
"net/http"
"os"
)

func main() {
client := sendgrid.NewRestClientWithParams(sendgrid.ClientParams{
ApiKey: os.Getenv("SENDGRID_API_KEY"),
})
name := "John Doe"
subject := "Sending with Twilio SendGrid is Fun"
mailTo := &MailV3.MailTo{Email: "[email protected]"}
to := []MailV3.MailTo{*mailTo}
sendMailRequest := MailV3.SendMailRequest{
From: MailV3.MailFrom{Name: &name, Email: VERIFIED_EMAIL},
ReplyTo: mailTo,
Subject: &subject,
Personalizations: []MailV3.SendMailRequestPersonalizationsInner{{To: to}},
Content: &[]MailV3.SendMailRequestContentInner{{Type: "text/plain", Value: "Abc"}},
}
sendMailParam := &MailV3.SendMailParam{SendMailRequest: &sendMailRequest}
resp, err := client.MailV3.SendMail(sendMailParam)
if err != nil {
fmt.Println("Error sending mail: " + err.Error())
} else {
response, _ := json.Marshal(resp)
var ps http.Response
json.Unmarshal(response, &ps)
fmt.Println(ps.StatusCode)
fmt.Println(ps.Body)
fmt.Println(ps.Header)
}
}
```

### With Mail Helper Class

```go
Expand Down
11 changes: 0 additions & 11 deletions UPGRADE.md

This file was deleted.

13 changes: 0 additions & 13 deletions client/base_client.go

This file was deleted.

161 changes: 0 additions & 161 deletions client/client.go

This file was deleted.

Loading

0 comments on commit cc2a68a

Please sign in to comment.