<commit_before>package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

var (
	accessToken = flag.String("accessToken", "", "Access Token")
	clientID    = flag.String("clientID", "", "Client ID")
)

func main() {
	flag.Parse()

	if *accessToken == "" {
		log.Fatal("Access Token must be provided")
	}

	if *clientID == "" {
		log.Fatal("Client ID must be provided")
	}

	client := &http.Client{}
	userRequest, err := http.NewRequest("GET", "https://a.wunderlist.com/api/v1/user", nil)
	userRequest.Header.Add("X-Access-Token", *accessToken)
	userRequest.Header.Add("X-Client-ID", *clientID)

	resp, err := client.Do(userRequest)
	if err != nil {
		log.Printf("Error making request: %s\n", err.Error())
	}
	if resp != nil {
		defer resp.Body.Close()
		body, err := ioutil.ReadAll(resp.Body)
		if err != nil {
			log.Printf("Error reading response body: %s\n", resp.Body)
		}
		fmt.Printf("%s\n", string(body))
	}
}<commit_msg>Add User struct and deserialize json response into it.<commit_after>package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

var (
	accessToken = flag.String("accessToken", "", "Access Token")
	clientID    = flag.String("clientID", "", "Client ID")
)

type User struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	Email      string `json:"email"`
	CreatedAt  string `json:"created_at"`
	UpdatedAt  string `json:"updated_at"`
	Revision   int    `json:"revision"`
	TypeString string `json:"type"`
}

func main() {
	flag.Parse()

	if *accessToken == "" {
		log.Fatal("Access Token must be provided")
	}

	if *clientID == "" {
		log.Fatal("Client ID must be provided")
	}

	client := &http.Client{}
	userRequest, err := http.NewRequest("GET", "https://a.wunderlist.com/api/v1/user", nil)
	userRequest.Header.Add("X-Access-Token", *accessToken)
	userRequest.Header.Add("X-Client-ID", *clientID)

	resp, err := client.Do(userRequest)
	if err != nil {
		log.Printf("Error making request: %s\n", err.Error())
	}
	if resp != nil {
		defer resp.Body.Close()
		body, err := ioutil.ReadAll(resp.Body)
		if err != nil {
			log.Printf("Error reading response body: %s\n", err.Error())
		}
		var u User
		err = json.Unmarshal(body, &u)
		if err != nil {
			log.Printf("Error unmarshalling response body: %s\n", err.Error())
		}
		fmt.Printf("%+v\n", u)
	}
}
{'fraction_non_alphanumeric': 0.1822070145423439, 'fraction_numerical': 0.000855431993156544, 'mean_word_length': 3.7348178137651824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '25601', 'n_tokens_mistral': 900, 'n_tokens_neox': 864, 'n_words': 198}