Code Monkey home page Code Monkey logo

target-dotnet-sdk's Introduction

Adobe Target .Net SDK

GitHub Actions Status

GitHub Actions Build History

The Adobe Target .Net SDK uses the Target Delivery API to retrieve and deliver personalized experiences.

Table of contents

Getting started

Prerequisites

At a minimum .NET Core SDK 2.0 is required to build, test, and generate NuGet packages.
Note: the SDK itself multi-targets .NET Standard 2.0, .NET 5, 6 and 7

macOS/Linux

On macOS or Linux we recommend Visual Studio Code with the C# Extension. See the getting started guide for VS Code and .NET.

Windows:

On Windows, we recommend installing the latest Visual Studio 2019.

Installation

To get started with Target .NET SDK, just add it as a dependency by installing from NuGet.

Super Simple to Use

Please take a look at our documentation to learn how to use the .NET SDK.

Sample Apps

There's a couple of sample apps showing sample sync/async Target SDK usage under SampleApp project.
To switch between sync and async sample apps, just modify StartupObject property in SampleApp project file accordingly.

Build

To build everything and generate NuGet packages, run dotnet Cake CLI commands. Binaries and NuGet packages will be dropped in an Artefacts directory at the repo root.

# Build sdk, run tests, generate coverage and pack
dotnet cake

# Alternatively, run separate Cake tasks
dotnet cake --target=Build
dotnet cake --target=Test
dotnet cake --target=Pack

Each project can also be built individually directly through the CLI or your editor/IDE. You can open the solution file Adobe.Target.Client.sln in repo root to load all sdk, sample and test projects.

Releases

We publish NuGet packages to nuget.org for each release.

Contributing

Contributions are welcome! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

back to top

target-dotnet-sdk's People

Contributors

ericfichtel avatar xdex avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

target-dotnet-sdk's Issues

Exception while sending notifications

Description

When sending notifications with the delivery api, it fails to convert the Json response due to a mistype and throws the following error:

Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Adobe.Target.Delivery.Model.NotificationResponse' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path 'notifications', line 1, position 211.

To Reproduce

A link to some code to reproduce the bug can speed up a fix. Alternatively, show steps to reproduce the behaviour:

  1. Place a breakpoint in the line 489 of the class Adobe.Target.Delivery\Client\ApiClient.cs.
  2. Execute the sample project and wait until the "GetOffer" method is called and the breakpoint is reached.
  3. Check the attribute ErrorException of the variable response
  4. See error

Cause of issue

The API is returning an array of Notifications, and the DeliveryResponse class is expecting a single Object of type NotificationRequest. When it's trying to convert the array into a single object it fails throwing the exception.

Expected behaviour

The DeliveryResponse should accept multiple notifications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.