<commit_before>﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Skybrud.Essentials.Common;
using Skybrud.Essentials.Http;
using Skybrud.Social.Dropbox.Http;

namespace Skybrud.Social.Dropbox.Options.Files.Thumbnails {

    public class DropboxGetThumbnailBatchOptions : IHttpRequestOptions {

        #region Properties

        [JsonProperty("entries")]
        public List<DropboxThumbnailArg> Entries { get; set; }

        #endregion

        #region Constructors

        public DropboxGetThumbnailBatchOptions() {
            Entries = new List<DropboxThumbnailArg>();
        }

        public DropboxGetThumbnailBatchOptions(string[] paths) {
            Entries = new List<DropboxThumbnailArg>();
            if (paths == null) return;
            foreach (string path in paths) {
                Entries.Add(new DropboxThumbnailArg(path));
            }
        }

        public DropboxGetThumbnailBatchOptions(string[] paths, DropboxThumbnailFormat format, DropboxThumbnailSize size, DropboxThumbnailMode mode) {
            Entries = new List<DropboxThumbnailArg>();
            if (paths == null) return;
            foreach (string path in paths) {
                Entries.Add(new DropboxThumbnailArg(path, format, size, mode));
            }
        }

        public DropboxGetThumbnailBatchOptions(params DropboxThumbnailArg[] args) {
            Entries = new List<DropboxThumbnailArg>();
            if (args == null) return;
            Entries.AddRange(args);
        }

        public DropboxGetThumbnailBatchOptions(IEnumerable<DropboxThumbnailArg> args) {
            Entries = new List<DropboxThumbnailArg>();
            if (args == null) return;
            Entries.AddRange(args);
        }

        #endregion

        #region Member methods

        public HttpRequest GetRequest() {

            if (Entries == null) throw new PropertyNotSetException(nameof(Entries));

            JObject body = JObject.FromObject(this);

            throw new Exception(body + "");
            
            return HttpRequest.Post("https://content.dropboxapi.com/2/files/get_thumbnail_batch", body);

        }

        #endregion

    }

}<commit_msg>Removed throw statement as it was only used for testing<commit_after>﻿using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Skybrud.Essentials.Common;
using Skybrud.Essentials.Http;
using Skybrud.Social.Dropbox.Http;

namespace Skybrud.Social.Dropbox.Options.Files.Thumbnails {

    public class DropboxGetThumbnailBatchOptions : IHttpRequestOptions {

        #region Properties

        [JsonProperty("entries")]
        public List<DropboxThumbnailArg> Entries { get; set; }

        #endregion

        #region Constructors

        public DropboxGetThumbnailBatchOptions() {
            Entries = new List<DropboxThumbnailArg>();
        }

        public DropboxGetThumbnailBatchOptions(string[] paths) {
            Entries = new List<DropboxThumbnailArg>();
            if (paths == null) return;
            foreach (string path in paths) {
                Entries.Add(new DropboxThumbnailArg(path));
            }
        }

        public DropboxGetThumbnailBatchOptions(string[] paths, DropboxThumbnailFormat format, DropboxThumbnailSize size, DropboxThumbnailMode mode) {
            Entries = new List<DropboxThumbnailArg>();
            if (paths == null) return;
            foreach (string path in paths) {
                Entries.Add(new DropboxThumbnailArg(path, format, size, mode));
            }
        }

        public DropboxGetThumbnailBatchOptions(params DropboxThumbnailArg[] args) {
            Entries = new List<DropboxThumbnailArg>();
            if (args == null) return;
            Entries.AddRange(args);
        }

        public DropboxGetThumbnailBatchOptions(IEnumerable<DropboxThumbnailArg> args) {
            Entries = new List<DropboxThumbnailArg>();
            if (args == null) return;
            Entries.AddRange(args);
        }

        #endregion

        #region Member methods

        public HttpRequest GetRequest() {
            if (Entries == null) throw new PropertyNotSetException(nameof(Entries));
            return HttpRequest.Post("https://content.dropboxapi.com/2/files/get_thumbnail_batch", JObject.FromObject(this));
        }

        #endregion

    }

}
{'fraction_non_alphanumeric': 0.09001823154056518, 'fraction_numerical': 0.00045578851412944393, 'mean_word_length': 2.477812995245642, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '6545287', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1169, 'n_words': 251}