Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Started development of 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AptiviCEO committed Aug 12, 2023
1 parent 7f1bed0 commit dd5ff03
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
6 changes: 2 additions & 4 deletions Dictify/Dictify.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<SignAssembly>False</SignAssembly>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.0.0.2</Version>
<Version>1.1.0</Version>
<Authors>Aptivi</Authors>
<Company>Aptivi.</Company>
<Description>Dictionary API frontend</Description>
Expand All @@ -17,7 +16,7 @@
<PackageTags>dictionary;api;free;csharp;visualbasic;word;meaning;definition</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageVersion>1.0.0.2</PackageVersion>
<PackageVersion>1.1.0</PackageVersion>
<PackageIcon>OfficialAppIcon-Dictify-512.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<LangVersion>8.0</LangVersion>
Expand All @@ -32,7 +31,6 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Dictify/DictionaryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public static DictionaryWord[] GetWordInfo(string Word)
string WordInfoString = new StreamReader(WordInfoStream).ReadToEnd();

// Serialize it to DictionaryWord to cache it so that we don't have to download it again
DictionaryWord[]? Words = (DictionaryWord[]?)JsonConvert.DeserializeObject(WordInfoString, typeof(DictionaryWord[]));
DictionaryWord[] Words = (DictionaryWord[])JsonConvert.DeserializeObject(WordInfoString, typeof(DictionaryWord[]));
CachedWords.AddRange(Words);

// Return the word
return CachedWords.ToArray();
}
}
}
}
}
42 changes: 21 additions & 21 deletions Dictify/DictionaryWord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ public partial class DefinitionType
/// Word definition
/// </summary>
[JsonProperty("definition")]
public string? Definition { get; set; }
public string Definition { get; set; }

/// <summary>
/// List of synonyms based on the definition
/// </summary>
[JsonProperty("synonyms")]
public List<string>? Synonyms { get; set; }
public List<string> Synonyms { get; set; }

/// <summary>
/// List of antonyms based on the definition
/// </summary>
[JsonProperty("antonyms")]
public List<object>? Antonyms { get; set; }
public List<object> Antonyms { get; set; }

/// <summary>
/// Example in sentence
/// </summary>
[JsonProperty("example")]
public string? Example { get; set; }
public string Example { get; set; }
}

/// <summary>
Expand All @@ -72,13 +72,13 @@ public partial class License
/// License name
/// </summary>
[JsonProperty("name")]
public string? Name { get; set; }
public string Name { get; set; }

/// <summary>
/// License URL
/// </summary>
[JsonProperty("url")]
public string? Url { get; set; }
public string Url { get; set; }
}

/// <summary>
Expand All @@ -90,25 +90,25 @@ public partial class Meaning
/// Part of speech, usually noun, verb, adjective, adverb, interjection, etc.
/// </summary>
[JsonProperty("partOfSpeech")]
public string? PartOfSpeech { get; set; }
public string PartOfSpeech { get; set; }

/// <summary>
/// List of word definitions. Words usually come with one or more definitions.
/// </summary>
[JsonProperty("definitions")]
public List<DefinitionType>? Definitions { get; set; }
public List<DefinitionType> Definitions { get; set; }

/// <summary>
/// List of synonyms based on the word meaning
/// </summary>
[JsonProperty("synonyms")]
public List<string>? Synonyms { get; set; }
public List<string> Synonyms { get; set; }

/// <summary>
/// List of antonyms based on the word meaning
/// </summary>
[JsonProperty("antonyms")]
public List<string>? Antonyms { get; set; }
public List<string> Antonyms { get; set; }
}

/// <summary>
Expand All @@ -120,61 +120,61 @@ public partial class Phonetic
/// Phonetic representation of the word
/// </summary>
[JsonProperty("text")]
public string? Text { get; set; }
public string Text { get; set; }

/// <summary>
/// Link to the pronounciation, usually in MP3 format. Use NAudio (Windows) to play it.
/// </summary>
[JsonProperty("audio")]
public string? Audio { get; set; }
public string Audio { get; set; }

/// <summary>
/// From where did we get the audio from?
/// </summary>
[JsonProperty("sourceUrl")]
public string? SourceUrl { get; set; }
public string SourceUrl { get; set; }

/// <summary>
/// License information for the source
/// </summary>
[JsonProperty("license")]
public License? License { get; set; }
public License License { get; set; }
}

/// <summary>
/// The actual word
/// </summary>
[JsonProperty("word")]
public string? Word { get; set; }
public string Word { get; set; }

/// <summary>
/// The base phonetic representation of the word
/// </summary>
[JsonProperty("phonetic")]
public string? PhoneticWord { get; set; }
public string PhoneticWord { get; set; }

/// <summary>
/// The alternative phonetic representations
/// </summary>
[JsonProperty("phonetics")]
public List<Phonetic>? Phonetics { get; set; }
public List<Phonetic> Phonetics { get; set; }

/// <summary>
/// Word meanings
/// </summary>
[JsonProperty("meanings")]
public List<Meaning>? Meanings { get; set; }
public List<Meaning> Meanings { get; set; }

/// <summary>
/// License information
/// </summary>
[JsonProperty("license")]
public License? LicenseInfo { get; set; }
public License LicenseInfo { get; set; }

/// <summary>
/// List of where we got the word information from
/// </summary>
[JsonProperty("sourceUrls")]
public List<string>? SourceUrls { get; set; }
public List<string> SourceUrls { get; set; }
}
}
}

0 comments on commit dd5ff03

Please sign in to comment.