<commit_before>﻿@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using nuPickers;
@using nuPickers.FlickrPickers;

@{
    int contextId = int.Parse(Model.MacroParameters["contextId"].ToString());
    string propertyAlias = Model.MacroParameters["propertyAlias"].ToString();
    string key = Model.MacroParameters["key"].ToString();    

    FlickrImage flickrImage = new Picker(contextId, propertyAlias).GetFlickrImage(key);
    
    <img src="@flickrImage.ThumbnailUrl" />
    <p>@key</p>    
}<commit_msg>commenting example macro<commit_after>﻿@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using nuPickers; @* Picker obj *@
@using nuPickers.FlickrPickers; @* extension methods on Picker obj *@
@{
    /*
     * Optional Macro Parameters:
     *      
     *  contextId       - the current document / media or member being edited
     *  propertyAlias   - the property alias of the picker
     *  key             - the key value of the current item being processed
     *  label           - the label value of the current item being processed
     *  keys            - the full collection of all item keys
     *  counter         - the index of the current item being processed
     *  total           - the total number of items
     * 
     */

    // This example uses three Macro parameters:
    int contextId = int.Parse(Model.MacroParameters["contextId"].ToString());
    string propertyAlias = Model.MacroParameters["propertyAlias"].ToString();
    string key = Model.MacroParameters["key"].ToString();

    // The contextId and propertyAlias can be used to identify the current picker
    Picker picker = new Picker(contextId, propertyAlias);
    
    // using the FlickrPicker specific extension method, get the current FlickrImage
    FlickrImage flickrImage = picker.GetFlickrImage(key);
    
    /*
     * FlickrImage Properties:
     * 
     *  PhotoId
     *  DateTaken
     *  DateUploaded
     *  Title
     *  Description
     *  OriginalUrl
     *  LargeUrl
     *  MediumUrl
     *  SmallUrl
     *  ThumbnailUrl
     *  SquareThumbnailUrl
     *  WebUrl
     * 
     */
        
    <img src="@flickrImage.ThumbnailUrl" />
    <h4>@flickrImage.Title</h4>
    <h5>@flickrImage.DateTaken.ToShortDateString()</h5>  
}
{'fraction_non_alphanumeric': 0.09545049063336307, 'fraction_numerical': 0.001784121320249777, 'mean_word_length': 2.683087027914614, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '5567161', 'n_tokens_mistral': 676, 'n_tokens_neox': 648, 'n_words': 163}