added nsfw results for search functions

This commit is contained in:
2026-05-25 18:36:52 -05:00
parent 20b69e66fb
commit 68b11ef35c
3 changed files with 57 additions and 2 deletions
+2
View File
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"log/slog"
"net/http"
"net/url"
"reflect"
@@ -348,6 +349,7 @@ func parseRate(r *http.Response) Rate {
// pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface,
// the raw response will be written to v, without attempting to decode it.
func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) {
slog.Debug("Making API request to reddit", "url", req.URL.String(), "method", req.Method)
if err := c.checkRateLimitBeforeDo(req); err != nil {
return &Response{
Response: err.Response,